This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Building application from Github

I have downloaded the example application code from github (https://github.com/NordicSemiconductor/IOS-Nordic-Thingy) and am trying to build it using the latest xcode development environment provided by Apple. In the instructions, it says to:

  • Create/Update your Podfile with the following contents
target 'YourAppTargetName' do
    use_frameworks!
    pod 'IOSThingyLibrary', '~> 1.4.0'
end
  • Install dependencies
pod install
  • Open the newly created .xcworkspace
  • Import the library to any of your classes by using import IOSThingyLibrary and begin working on your project

but it is unclear where to perform the above.  Is it done in the 'Example' subdirectory or the 'IOS-Nordic-Thingy' or some other directory? Afterwards, the user is instructed to edit the "newly created .xcworkspace" but there appear to be three different files like this located at:

./Example/ThingySDK.xcodeproj/project.xcworkspace

./Example/Pods/Pods.xcodeproj/project.xcworkspace

./Example/ThingySDK.xcworkspace

So I am not sure which is the correct one to open.

I would like to simply recreate the Thingy52 application based on the provided instructions but the instruction seem incomplete or simply not descriptive enough to replace. 

Can you provide a more complete set of instructions so that I am able to recreate the App?

Thank you! 

Parents
  • Hello,

    The instructions you mentioned above are useful when you want to include Thingy library in your project. Then, in your project's Podfile you need to add reference to IOSThingyLibrary. Then, in classes that you need to use Thingy API, you put this import statement. But if you just want to compile the sample app, either clone the repo and open Example/ThigySDK.xcworkspace, or use

    pod try IOSThingyLibrary

    This will download the sample app and set up all dependencies. You may then open it in xcode by opening the same workspace file.

  • Thanks for the reply Aleksander, I did try the 'pod try IOSThingLibrary' previously and just tried again, when I do it says:

    Jamess-Mac-mini:MyGithub jflynn$ pod try IOSThingyLibrary
    Updating spec repositories
    
    Trying IOSThingyLibrary
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
    ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
    
    ### Command
    
    ```
    /usr/local/bin/pod try IOSThingyLibrary
    ```
    
    ### Report
    
    * What did you do?
    
    * What did you expect to happen?
    
    * What happened instead?
    
    
    ### Stack
    
    ```
       CocoaPods : 1.9.0.beta.2
            Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
        RubyGems : 3.0.3
            Host : Mac OS X 10.15.2 (19C57)
           Xcode :  ()
             Git : git version 2.24.0
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    ```
    
    ### Plugins
    
    ```
    cocoapods-deintegrate : 1.0.4
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-stats       : 1.1.0
    cocoapods-trunk       : 1.4.1
    cocoapods-try         : 1.1.0
    ```
    
    ### Error
    
    ```
    NoMethodError - undefined method `root' for false:FalseClass
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/lib/cocoapods/installer/pod_source_installer.rb:179:in `root_spec'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/lib/cocoapods/installer/pod_source_installer.rb:192:in `predownloaded?'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:139:in `install_pod'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:50:in `block in run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/lib/cocoapods/user_interface.rb:118:in `title'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:49:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0.beta.2/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    ```
    
    ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
    
    [!] Oh no, an error occurred.
    
    Search for existing GitHub issues similar to yours:
    https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60root%27+for+false%3AFalseClass&type=Issues
    
    If none exists, create a ticket, with the template displayed above, on:
    https://github.com/CocoaPods/CocoaPods/issues/new
    
    Be sure to first read the contributing guide for details on how to properly submit a ticket:
    https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
    
    Don't forget to anonymize any private data!
    
    Looking for related issues on cocoapods/cocoapods...
     - error pod try MaterialComponents
       https://github.com/CocoaPods/CocoaPods/issues/9452 [closed] [1 comment]
       4 weeks ago
    
     - pod try BEMCheckBox stacktrace
       https://github.com/CocoaPods/CocoaPods/issues/9415 [closed] [1 comment]
       7 weeks ago
    
     - pod install UrbanAirship-iOS-SDK failed
       https://github.com/CocoaPods/CocoaPods/issues/9403 [closed] [5 comments]
       13 Dec 2019
    
    and 2 more at:
    https://github.com/cocoapods/cocoapods/search?q=undefined%20method%20%60root%27%20for%20false%3AFalseClass&type=Issues&utf8=✓
    Jamess-Mac-mini:MyGithub jflynn$ 

    So this solution isn't working as you may expect it to be. Am I doing something wrong or is there something additional that needs to be installed to make this work?

    I did clone the repository and used the workspace you mentioned, using this approach does work, but generates 101 warnings and wants to update to swift 5.  Do you know if there is any update available that corrects these warnings and has already been updated to swift 5?  I would like to use this project as a starting point for something I'm working on but would like to not have to go back and fix warnings and update to create a clean project.

  • The issue you are having is described here: https://github.com/CocoaPods/cocoapods-try/issues/63 and seems it still hasn't been fixed. Instead, just clone the IOS-Pods-DFU-Library repo and launch the ./Example/ThingySDK.xcworkspace file in xcode.

Reply Children
No Data
Related