mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Example problem #58

Closed kopacabana closed 5 years ago

kopacabana commented 5 years ago

Hello,

Sorry but I try to use your example but I've got an error. Here is the steps :

  1. I download zip

  2. Open terminal and create a pod file in mapbox-scenekit-master directory with pod init

  3. I copy lines below in pod file : platform :ios, '11.0' target 'MapboxSceneKit' do pod 'MapboxSceneKit', :git => 'https://github.com/mapbox/mapbox-scenekit.git' pod 'MapboxMobileEvents' end

  4. In terminal I run pod repo update and after pod install

  5. I open xcworkspace generate by podfile

  6. I build with Target MapboxSceneKit, everything is OK

  7. I build with Target Examples and I've got this error message : Multiple commands produce '/Users/lb/Library/Developer/Xcode/DerivedData/MapboxSceneKit-fxsjkxrwxepjvfdsebkcqkevmcad/Build/Products/Debug-iphoneos/Examples.app/Frameworks/MapboxSceneKit.framework': 1) Target 'Examples' has copy command from '/Users/lb/Library/Developer/Xcode/DerivedData/MapboxSceneKit-fxsjkxrwxepjvfdsebkcqkevmcad/Build/Products/Debug-iphoneos/MapboxSceneKit.framework' to '/Users/lb/Library/Developer/Xcode/DerivedData/MapboxSceneKit-fxsjkxrwxepjvfdsebkcqkevmcad/Build/Products/Debug-iphoneos/Examples.app/Frameworks/MapboxSceneKit.framework' 2) That command depends on command in Target 'Examples': script phase “[CP] Embed Pods Frameworks”

What I'm doing wrong ? How can I execute your example scene without error ?

Sorry for my noob question ? Hope someone can help me ! Thanks a lot

jim-martin commented 5 years ago

Hi @kopacabana,

It looks like you're importing the framework twice. To import the project, you can download the .zip or import the framework with cocoapods/carthage, but not both.

The .zip file includes an examples project you can build right away, no podfile setup required. I'd recommend starting with this.

Cocoapods and Carthage are designed to automatically import frameworks into another project or workspace. To use those, create a fresh project and follow the setup guide.

JeremyRaven commented 5 years ago

Hi there,

Downloading the .zip file and building the MapboxSceneKit.xcodeproj file gives this error ...

/Users/jeremyraven/Downloads/mapbox-scenekit-master-2/MapboxSceneKit/MapboxImageAPI.swift:4:8: No such module 'MapboxMobileEvents'

Even though I can see MapboxMobileEvents.framework in the frameworks folder. Any help would be appreciated thank you.

jim-martin commented 5 years ago

@JeremyRaven, the examples installation guide should help you out.