Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
518 views
in Technique[技术] by (71.8m points)

ios7 - Xcode 6 Beta not compiling

I've got the following problem: I've written my first Swift App (for iOS7) and it worked fine. After changing some minor detail (adding a string somewhere) it wouldn't compile anymore, even if I changed everything back how it was before.

There is no error message or anything like it, it says that it's building the project (Compiling Swift Source Files) but it's not progressing at all, even after hours of "building".

I've tried it with Xcode 6 b1 and b2 and with both it's the same: all the other projects are compiling without any problems, this one get's stuck.

Does anyone have a clue what might be the problem and how to solve it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Debug the code manually works for me.

Finally I find the root cause of my problem is too many string concatenation in one line.

Bug code:

var string = string1 + string2 + string3 + string4 + string5 + string6 + string7 + string8 

Fixed code:

var string = string1
string += string2
string += string3
string += string4
string += string5
string += string6
string += string7
string += string8

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...