Xcode 7.1 Beta: Content of File Error

Xcode 7.1 beta: Content Of File Error

You need to implement do try catch error handling. Try like this:

edit/update:

Swift 3 or later

if let fileURL = Bundle.main.url(forResource: "Chapters", withExtension: "txt") {
do {
let string = try String(contentsOf: fileURL, encoding: .utf8)
var chapters = string.components(separatedBy: "@")
chapters.removeFirst()
} catch {
print(error)
}
}

ibtool fails to compile storyboard in Xcode 7.1 Beta

So thanks to an Apple support staff member, the solution is to move the Main.storyboard file from the Compile Sources build phase to the Copy Bundle Resources phase.

Xcode 7 beta - build error (xcassets)

Navigate to ~/Library/Developer/CoreSimulator/Profiles/Runtimes, then remove the runtime - the runtime is old. After, reboot Xcode7, and launch the Simulator...

Further explanation from @seancook:

I experienced this, too, on El Capitan. NIBs wouldn't load, no Sims
present, and unable to launch Simulators through the Xcode/Open
Developer Tool/Simulator menu. After fighting it for a few hours I've
finally got it working.

Here's what worked for me (YMMV): I
noticed a message in Console.app along the lines of the Simulator
runtime not being code signed. I went to the path it described
"/Library/Developer/CoreSimulator/Profiles/Runtimes" and removed the
runtimes that I had there. They were old runtimes, so I assume that
some check in Xcode now applies that didn't previously. Who knows?

After doing this, I could finally launch the Simulator via the
Xcode/Open Developer Tool menu. Unfortunately, the Simulator still
wasn't being shown as a run target in my workspace, so I kept
spelunking...

I then went into the Simulator's Hardware/Devices/Manage Devices menu and added a new iOS9 device. It didn't seem to do anything, so I quit out of Xcode and Simulator.app.
I then re-started Simulator.app (via Xcode/ODT/Simulator) and lo and
behold the expected iOS9 simulators were displayed. I closed and
re-opened Xcode, changed the target OS for my project, and the Sims
were finally displayed as run targets.

Error while building app in Xcode 7.1

You have accidentally included the XIB in your WatchKit extension or WatchApp extension. (I know because it happened to me too)

To solve:

  • In the Project navigator, click on the XIB file.
  • Then, in the Utilities pane, look under 'Target Membership' and un-tick any
    'WatchKit Apps' or 'WatchKit Extensions'.

Xcode 7 beta 5 Error

This is a very common problem in the Xcode betas. Check one of the many other answered questions.

_BSMachError XCode 7 Beta

Although this problem seems to persist as a bug and will likely be fixed, it stems from the new App Transport Security that has been implemented in iOS 9.

If your application pulls data from a web server, in order to populate the View Controller that you will be presenting, you can resolve these errors by verifying/granting access to the particular site(s) you're pulling from.

In order to address this you will add the following to your App's .plist file:

  • You may want to alter your ATS Exception Dictionary to fit your needs

    <key>NSAppTransportSecurity</key>
    <dict>
    <key>NSExceptionDomains</key>
    <dict>
    <key>testdomain.com</key>
    <dict>
    <key>NSIncludesSubdomains</key>
    <false/>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <false/>
    <key>NSExceptionRequiresForwardSecrecy</key>
    <true/>
    <key>NSExceptionMinimumTLSVersion</key>
    <string>TLSv1.2</string>
    <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
    <false/>
    <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
    <true/>
    <key>NSThirdPartyExceptionMinimumTLSVersion</key>
    <string>TLSv1.2</string>
    <key>NSRequiresCertificateTransparency</key>
    <false/>
    </dict>
    </dict>
    </dict>

More details to this solution can be found here or here
The Apple Documentation for App Transport Security is worth reading too.

Is it possible to upload to App Store using Xcode 7.1 (beta)?

Nope, you cannot with beta versions of Xcode (same as with previous beta versions of Xcode). Now the newest Xcode version is the 7.1 beta which cannot be used for publishing apps. But there is Xcode 7.0 GM version and with this one it should be possible to publish app. Now when I am uploading apps it gives me same warning ("Invalid Toolchain..."; but I have it in testing for internal testers, I am uploading app via Application Loader) but it shouldn't take long and after few days Apple sends emails to developers that App Store now accepts iOS 9 versions of apps.

Compilation error in Release in Xcode 7 beta 5 in Swift code

I was having this same problem (beta 5 only).

It was where I was trying to append a closure to an array of closures, it looks to be the same for yours where you have an addCallback method in your MyClass class.

As silly as it is, I got mine to build on release from changing this code:

callbacks.append(newCallback)

to this

callbacks = callbacks + [newCallback]



Related Topics



Leave a reply



Submit