Skip to content

Commit

Permalink
Changed SceneKit Support to Opt-In
Browse files Browse the repository at this point in the history
  • Loading branch information
b3ll committed Jan 15, 2015
1 parent 0d42011 commit 22ad8ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ PRODUCT_NAME = pop
INFOPLIST_FILE = pop-embedded/Info.plist

// Compiler Options,
OTHER_LDFLAGS = $(inherited) -weak_framework UIKit -weak_framework QuartzCore -weak_framework CoreGraphics -weak_framework CoreImage -weak_framework SceneKit -ObjC
OTHER_LDFLAGS = $(inherited) -weak_framework UIKit -weak_framework QuartzCore -weak_framework CoreGraphics -weak_framework CoreImage -ObjC
3 changes: 0 additions & 3 deletions Configuration/Platform/Compiler.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ CLANG_ENABLE_OBJC_ARC = YES

// Allow #import'ing code generated headers from DERIVED_FILE_DIR.
HEADER_SEARCH_PATHS = $(inherited) $(DERIVED_FILE_DIR)

// Weakly Link SceneKit
OTHER_LDFLAGS = $(inherited) -weak_framework SceneKit
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ pod install

Assuming CocoaPods is installed, this will include the necessary OCMock dependency to the unit test targets.

## SceneKit

Due to SceneKit requiring iOS 8 and OS X 10.9, POP's SceneKit extensions aren't provided out of box. Unfortunately, [weakly linked frameworks](https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html) cannot be used due to issues mentioned in the [Xcode 6.1 Release Notes](https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html).

To remedy this, you can easily opt-in to use SceneKit! Simply add this to the Preprocessor Macros section of your Xcode Project:

```
POP_USE_SCENEKIT=1
```

## Resources

A collection of links to external resources that may prove valuable:
Expand Down
4 changes: 2 additions & 2 deletions pop/POPDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#endif

#if TARGET_OS_MAC
#define SCENEKIT_SDK_AVAILABLE defined(__MAC_10_10)
#define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT)
#elif TARGET_OS_IPHONE
#define SCENEKIT_SDK_AVAILABLE defined(__IPHONE_8_0)
#define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT)
#endif

#endif

0 comments on commit 22ad8ef

Please sign in to comment.