PDA

View Full Version : Swift demo - builds ok, but fails to archive - FIXED



BuzzBangBuzz
27.02.2015, 12:41
Hi Peeps,

TLDR - fix: add the bridging header (defined for debug, just copy file path) to the release target . Hope this helps someone.

----

Using the modified version of the Swift demo on iOS, the demo builds and runs ok, but fails to archive - so I can't send a demo to a colleague. Most probably something simple, but I was banging my head against a wall for all of yesterday...

Swift demo version 2.3, XCode 6.1.1, Iphone 6 running 8.1.3 - builds and runs ok. BTW - there were some issues with optionals on UILabel on first build but simple to fix.

On archiving throws up errors in the files: RootViewController.swift, MapsJSONViewController, NavigationUIViewController, MenuView and AppDelegate

adding import UIKit and import SKMaps removed some errors, but still left with:

use of undeclared type SKTPackage, STKNavigationManager, STKNavigationManagerDelegate, STKNavigationConfiguration, STKNavigationStopReason

use of undeclared type UIView, UIButton, UISegementControl

fixed - there's more than one place to add the bridging hearer for the swift - obj-c file project and target, I was updating the project one, but not the target - updating the target release. Adding this earlier would have meant that the imports weren't necessary.

hope this helps

Cheers

Rob

ps hope it's ok to post here, move delete as appropriate

pps posting on the forum times out on me really quickly, causing me to lose the post and redo, groan - almost didn't bother

Adela_Silvia
02.03.2015, 17:36
Thanks for your post.
We hope this message will help other users dealing with the same scenario.

Samponiide
01.06.2015, 17:00
Itís really great posts.