amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

Apple Watch guide errors #110

Open calicoday opened 5 years ago

calicoday commented 5 years ago

Following the Apple Watch guide, I’ve got a simplest watchos app running but there were a few snags/hazy bits….

1/ in section 1, para 2, it says

To create the basic structure of our watchOS application, run the following command in the parent’s app directory:

but that should be “… in the parent app’s directory”. Maybe better, “… in the parent iOS application’s project directory” (verbose but it’s the first named location)

2/ early in section 2, we do

$ cd my_watch_app. 
$ bundle

Further on it says

$ cd my_watch_app
$ rake ib

but we’re already/still in my_watch_app, so no cd necessary.

3/ still in section 2, after the outlet hook up’s done, we need to save AND CLOSE the xcode project or the Interface.storyboard is not available for raking and buried in the console chatter we get:

   Compile simplest_watch/watch_app/Base.lproj/Interface.storyboard
/* com.apple.ibtool.errors */
/watch_app/Base.lproj/Interface.storyboard: error: Interface Builder could not open the document Interface.storyboard" because it does not exist.
rake aborted!
…

At least, this happens for me (macos 10.13.6, xcode 9.4.1, rubymotion 5.14). Don’t know about other os/xcode versions. Doesn’t matter if xcode is left running, so long as the project file is closed — obvious? Was to me but I tested it anyway to be sure. :-)

4a/ in section 3, it says

Both the iOS and the watchOS simulators will launch, and your application will open inside a debugger session.

Both sims do launch and ios and watchos apps are loaded. However before we can see the watchos app, the console shows

2018-10-21 07:26:32.444 repl[3371:4544345]  iOSSimulator: Timed out waiting for the simulator application for com.apple.platform.iphonesimulator to become ready
2018-10-21 07:26:32.444 repl[3371:4544338]  iOSSimulator: Timed out waiting for the simulator application for com.apple.platform.watchsimulator to become ready
kernel bitcode couldn't be read: Could not open input file: No such file or directory

================================================================================
The application terminated. A crash report file may have been generated by the
system, use `rake crashlog' to open it. Use `rake debug=1' to restart the app
in the debugger.
================================================================================
mica:simplest_ios cal$ 

(which I take from previous encounters is the DEBUGGER bailing). The sims stay up and the apps are useable.

4b/ BUT the watchos app doesn’t launch, despite having “initial controller” set in storyboard in IB (equivalent basic demo in swift run from xcode does). We have to click the crown and pick the app to see it, which works. Guide should probably say.

Haven’t tried devices or app store yet.