├── .gitattributes
├── .gitignore
├── DecorateYourRoom
├── DecorateYourRoom.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── DecorateYourRoom.xcscheme
└── DecorateYourRoom
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── chairbg.imageset
│ │ ├── Contents.json
│ │ └── chairbg.png
│ ├── gramophonebg.imageset
│ │ ├── Contents.json
│ │ └── gramophonebg.png
│ ├── lampbg.imageset
│ │ ├── Contents.json
│ │ └── lampbg.png
│ └── plantbg.imageset
│ │ ├── Contents.json
│ │ └── plantbg.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ModelManager.swift
│ ├── Reticle.swift
│ ├── ViewController.swift
│ └── art.scnassets
│ ├── BlueLamp
│ ├── materials.mtl
│ └── model-triangulated.scn
│ ├── Gramophone
│ ├── materials.mtl
│ └── model-triangulated.scn
│ ├── Plant
│ ├── PUSHILIN_plant.mtl
│ ├── PUSHILIN_plant.png
│ └── PUSHILIN_plant.scn
│ └── WoodChair
│ ├── CHAHIN_WOODEN_CHAIR.mtl
│ ├── CHAHIN_WOODEN_CHAIR.scn
│ └── CHAHIN_WOODEN_CHAIR_TEXTURE.jpg
├── HelloWorld
├── HelloWorld.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── HelloWorld.xcscheme
└── HelloWorld
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.swift
│ └── art.scnassets
│ ├── ship.scn
│ └── texture.png
├── PlacenoteSDKExample.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── Podfile
├── Podfile.lock
├── Pods
├── Manifest.lock
├── PlacenoteSDK
│ ├── CameraManager.swift
│ ├── Data.bin
│ ├── Event.swift
│ ├── FeaturePointVisualizer.swift
│ ├── LICENSE
│ ├── LibPlacenote.swift
│ ├── LocalizationThumbnailSelector.swift
│ ├── MulticastDelegate.swift
│ ├── Placenote.framework
│ │ ├── Headers
│ │ │ ├── Placenote.h
│ │ │ └── libPlacenote.h
│ │ ├── Info.plist
│ │ ├── Modules
│ │ │ └── module.modulemap
│ │ ├── Placenote
│ │ └── _CodeSignature
│ │ │ └── CodeResources
│ ├── UIImageUtil.swift
│ └── include
│ │ └── PlacenoteSDK-Bridging-Header.h
├── Pods.xcodeproj
│ └── project.pbxproj
└── Target Support Files
│ ├── PlacenoteSDK
│ ├── Info.plist
│ ├── PlacenoteSDK-Info.plist
│ ├── PlacenoteSDK-dummy.m
│ ├── PlacenoteSDK-prefix.pch
│ ├── PlacenoteSDK-umbrella.h
│ ├── PlacenoteSDK.modulemap
│ └── PlacenoteSDK.xcconfig
│ ├── Pods-DecorateYourRoom
│ ├── Info.plist
│ ├── Pods-DecorateYourRoom-Info.plist
│ ├── Pods-DecorateYourRoom-acknowledgements.markdown
│ ├── Pods-DecorateYourRoom-acknowledgements.plist
│ ├── Pods-DecorateYourRoom-dummy.m
│ ├── Pods-DecorateYourRoom-frameworks-Debug-input-files.xcfilelist
│ ├── Pods-DecorateYourRoom-frameworks-Debug-output-files.xcfilelist
│ ├── Pods-DecorateYourRoom-frameworks-Release-input-files.xcfilelist
│ ├── Pods-DecorateYourRoom-frameworks-Release-output-files.xcfilelist
│ ├── Pods-DecorateYourRoom-frameworks.sh
│ ├── Pods-DecorateYourRoom-resources.sh
│ ├── Pods-DecorateYourRoom-umbrella.h
│ ├── Pods-DecorateYourRoom.debug.xcconfig
│ ├── Pods-DecorateYourRoom.modulemap
│ └── Pods-DecorateYourRoom.release.xcconfig
│ ├── Pods-HelloWorld
│ ├── Info.plist
│ ├── Pods-HelloWorld-Info.plist
│ ├── Pods-HelloWorld-acknowledgements.markdown
│ ├── Pods-HelloWorld-acknowledgements.plist
│ ├── Pods-HelloWorld-dummy.m
│ ├── Pods-HelloWorld-frameworks-Debug-input-files.xcfilelist
│ ├── Pods-HelloWorld-frameworks-Debug-output-files.xcfilelist
│ ├── Pods-HelloWorld-frameworks-Release-input-files.xcfilelist
│ ├── Pods-HelloWorld-frameworks-Release-output-files.xcfilelist
│ ├── Pods-HelloWorld-frameworks.sh
│ ├── Pods-HelloWorld-resources.sh
│ ├── Pods-HelloWorld-umbrella.h
│ ├── Pods-HelloWorld.debug.xcconfig
│ ├── Pods-HelloWorld.modulemap
│ └── Pods-HelloWorld.release.xcconfig
│ └── Pods-RandomShapes
│ ├── Info.plist
│ ├── Pods-RandomShapes-Info.plist
│ ├── Pods-RandomShapes-acknowledgements.markdown
│ ├── Pods-RandomShapes-acknowledgements.plist
│ ├── Pods-RandomShapes-dummy.m
│ ├── Pods-RandomShapes-frameworks-Debug-input-files.xcfilelist
│ ├── Pods-RandomShapes-frameworks-Debug-output-files.xcfilelist
│ ├── Pods-RandomShapes-frameworks-Release-input-files.xcfilelist
│ ├── Pods-RandomShapes-frameworks-Release-output-files.xcfilelist
│ ├── Pods-RandomShapes-frameworks.sh
│ ├── Pods-RandomShapes-resources.sh
│ ├── Pods-RandomShapes-umbrella.h
│ ├── Pods-RandomShapes.debug.xcconfig
│ ├── Pods-RandomShapes.modulemap
│ └── Pods-RandomShapes.release.xcconfig
├── README.md
├── RandomShapes
├── RandomShapes.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── RandomShapes.xcscheme
└── RandomShapes
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── RandomName.swift
│ ├── ShapeManager.swift
│ ├── ShapeType.swift
│ └── ViewController.swift
└── license
├── LICENSE
├── License.DBoW2
├── License.OpenCV
├── License.curly
├── License.g2o
├── License.gtsam
└── License.libPlacenote
/.gitattributes:
--------------------------------------------------------------------------------
1 | PlacenoteSDK/PNSDK/libPlacenote.a filter=lfs diff=lfs merge=lfs -text
2 | PlacenoteSDK/PNSDK/libopencv.a filter=lfs diff=lfs merge=lfs -text
3 | PlacenoteSDK/PNSDK/Data.bin filter=lfs diff=lfs merge=lfs -text
4 | PlacenoteSDK/PNSDK/Placenote.framework/Placenote filter=lfs diff=lfs merge=lfs -text
5 | Pods/PlacenoteSDK/Placenote.framework/Placenote filter=lfs diff=lfs merge=lfs -text
6 | Pods/PlacenoteSDK/Data.bin filter=lfs diff=lfs merge=lfs -text
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | build
3 | *.xcodeproj/*
4 | **/xcuserdata
5 | !*.xcodeproj/project.pbxproj
6 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom.xcodeproj/xcshareddata/xcschemes/DecorateYourRoom.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // DecorateYourRoom
4 | //
5 | // Created by Neil Mathew on 10/10/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PlacenoteSDK
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 |
19 | LibPlacenote.instance.initialize(apiKey: Enter API Key Here, onInitialized: {(initialized: Bool?) -> Void in
20 | if (initialized!) {
21 | print ("SDK Initialized")
22 | }
23 | else {
24 | print ("SDK Could not be initialized")
25 | }
26 | })
27 |
28 | return true
29 | }
30 |
31 | func applicationWillResignActive(_ application: UIApplication) {
32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
33 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
34 | }
35 |
36 | func applicationDidEnterBackground(_ application: UIApplication) {
37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | func applicationWillEnterForeground(_ application: UIApplication) {
42 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
43 | }
44 |
45 | func applicationDidBecomeActive(_ application: UIApplication) {
46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
47 | }
48 |
49 | func applicationWillTerminate(_ application: UIApplication) {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 |
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/chairbg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "chairbg.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/chairbg.imageset/chairbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/chairbg.imageset/chairbg.png
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/gramophonebg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "gramophonebg.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/gramophonebg.imageset/gramophonebg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/gramophonebg.imageset/gramophonebg.png
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/lampbg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "lampbg.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/lampbg.imageset/lampbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/lampbg.imageset/lampbg.png
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/plantbg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "plantbg.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/plantbg.imageset/plantbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/Assets.xcassets/plantbg.imageset/plantbg.png
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.8
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 | arkit
33 |
34 | UIStatusBarHidden
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/ModelManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ModelManager.swift
3 | // DecorateYourRoom
4 | //
5 | // Created by Neil Mathew on 10/13/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SceneKit
11 | import ARKit
12 |
13 | // Struct to hold the model data
14 | struct ModelInfo {
15 | public var modelType: Int = 0
16 | public var modelPosition: SCNVector3 = SCNVector3(0,0,0)
17 | public var modelRotation: SCNVector4 = SCNVector4(0,0,0,0)
18 | }
19 |
20 |
21 | // Main model manager class.
22 | class ModelManager {
23 |
24 | // to hold the scene details
25 | private var sceneView: ARSCNView!
26 |
27 | // arrays to hold the model data
28 | private var modelInfoArray: [ModelInfo] = []
29 | private var modelNodeArray: [SCNNode] = []
30 |
31 | // variable that holds a static list of model paths
32 | private var modelNames: [String] = ["WoodChair/CHAHIN_WOODEN_CHAIR.scn",
33 | "Plant/PUSHILIN_plant.scn",
34 | "BlueLamp/model-triangulated.scn",
35 | "Gramophone/model-triangulated.scn"]
36 |
37 |
38 | // constructor that sets the scene
39 | init() {
40 | }
41 |
42 | public func setScene (view: ARSCNView) {
43 | sceneView = view
44 | }
45 |
46 | //add model to plane/mesh where reticle currently is, return the reticles global position
47 | public func addModelAtPose (pos: SCNVector3, rot: SCNVector4, index: Int) {
48 |
49 | // turn the scn file into a node
50 | let node = getModel(modelIndex: index)
51 |
52 | node.position = pos
53 | node.scale = SCNVector3(x:0.8, y:0.8, z:0.8)
54 |
55 | // not using the rotation actually. Instead we are setting the rotation to look at the camera
56 | let targetLookPos = SCNVector3(x: (sceneView?.pointOfView!.position.x)!, y: node.position.y, z: (sceneView.pointOfView?.position.z)!)
57 | node.look(at: targetLookPos)
58 |
59 | // add node to the scene
60 | sceneView.scene.rootNode.addChildNode(node)
61 |
62 | // add node the storage data structures
63 | let newModel: ModelInfo = ModelInfo(modelType: index, modelPosition: node.position, modelRotation: node.rotation)
64 |
65 | // add model to model list and model node list
66 | modelInfoArray.append(newModel)
67 | modelNodeArray.append(node)
68 |
69 | }
70 |
71 | // turn the scn file into a node
72 | func getModel (modelIndex: Int) -> SCNNode {
73 | let fileNodes = SCNScene(named: "art.scnassets/" + modelNames[modelIndex])
74 | let node = SCNNode()
75 | for child in (fileNodes?.rootNode.childNodes)! {
76 | node.addChildNode(child)
77 | }
78 | print ("created model from " + modelNames[modelIndex])
79 | return node
80 | }
81 |
82 | // turn the model array into a json object
83 | func getModelInfoJSON() -> [[String: [String: String]]]
84 | {
85 | var modelInfoJSON: [[String: [String: String]]] = []
86 |
87 | if (modelInfoArray.count > 0)
88 | {
89 | for i in 0...(modelInfoArray.count-1)
90 | {
91 | modelInfoJSON.append(["model": ["type": "\(modelInfoArray[i].modelType)", "px": "\(modelInfoArray[i].modelPosition.x)", "py": "\(modelInfoArray[i].modelPosition.y)", "pz": "\(modelInfoArray[i].modelPosition.z)", "qx": "\(modelInfoArray[i].modelRotation.x)", "qy": "\(modelInfoArray[i].modelRotation.y)", "qz": "\(modelInfoArray[i].modelRotation.z)", "qw": "\(modelInfoArray[i].modelRotation.w)" ]])
92 | }
93 | }
94 | return modelInfoJSON
95 | }
96 |
97 |
98 | // Load shape array
99 | func loadModelArray(modelArray: [[String: [String: String]]]?) -> Bool {
100 |
101 | clearModels()
102 |
103 | if (modelArray == nil) {
104 | print ("Model Manager: No models in this map")
105 | return false
106 | }
107 |
108 | for item in modelArray! {
109 | let px_string: String = item["model"]!["px"]!
110 | let py_string: String = item["model"]!["py"]!
111 | let pz_string: String = item["model"]!["pz"]!
112 |
113 | let qx_string: String = item["model"]!["qx"]!
114 | let qy_string: String = item["model"]!["qy"]!
115 | let qz_string: String = item["model"]!["qz"]!
116 | let qw_string: String = item["model"]!["qw"]!
117 |
118 | let position: SCNVector3 = SCNVector3(x: Float(px_string)!, y: Float(py_string)!, z: Float(pz_string)!)
119 | let rotation: SCNVector4 = SCNVector4(x: Float(qx_string)!, y: Float(qy_string)!, z: Float(qz_string)!, w: Float(qw_string)!)
120 | let type: Int = Int(item["model"]!["type"]!)!
121 |
122 | addModelAtPose(pos: position, rot: rotation, index: type)
123 |
124 | print ("Model Manager: Retrieved " + String(describing: type) + " type at position" + String (describing: position))
125 | }
126 |
127 | print ("Model Manager: retrieved " + String(modelInfoArray.count) + " models")
128 | return true
129 | }
130 |
131 | //clear shapes from scene
132 | func clearView() {
133 | for node in modelNodeArray {
134 | node.removeFromParentNode()
135 | }
136 | }
137 |
138 | // delete all models from scene and model lists
139 | func clearModels() {
140 | clearView()
141 | modelNodeArray.removeAll()
142 | modelInfoArray.removeAll()
143 | }
144 |
145 | }
146 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/Reticle.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Reticle.swift
3 | // DecorateYourRoom
4 | //
5 | // Created by Neil Mathew on 10/13/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import ARKit
11 |
12 | class Reticle {
13 |
14 |
15 | private var reticleNode: SCNNode = SCNNode()
16 |
17 | private var reticleActive: Bool = false
18 | private var reticleHit: Bool = false
19 | private var reticleHitIdx: Int = -1
20 | private var reticleHitTf: SCNMatrix4 = SCNMatrix4Identity
21 |
22 | private var sceneView: ARSCNView
23 |
24 | init() {
25 | sceneView = ARSCNView()
26 | }
27 |
28 | init(arview: ARSCNView) { //default initializer and default red reticle
29 | let reticleGeo: SCNGeometry = SCNCylinder(radius: 0.06, height: 0.005)
30 | reticleGeo.materials.first?.diffuse.contents = UIColor.red
31 | reticleNode = SCNNode(geometry: reticleGeo)
32 | reticleNode.opacity = 0.4
33 | reticleNode.isHidden = true
34 | reticleActive = false
35 | sceneView = arview
36 | sceneView.scene.rootNode.addChildNode(reticleNode)
37 | }
38 |
39 | init (arview: ARSCNView, reticle: SCNNode) {
40 | reticleNode = reticle
41 | sceneView = arview
42 | }
43 |
44 | public func activateReticle()
45 | {
46 | print ("Reticle activated")
47 | reticleActive = true
48 | reticleNode.isHidden = false
49 |
50 | }
51 |
52 | public func deactivateReticle()
53 | {
54 | print ("Reticle deactivated")
55 | reticleActive = false
56 | reticleNode.isHidden = true
57 | }
58 |
59 | func getReticlePosition () -> SCNVector3 {
60 | return reticleNode.position
61 | }
62 |
63 | func getReticleRotation () -> SCNVector4 {
64 | return reticleNode.rotation
65 | }
66 |
67 | // this moves the reticle based on the hittest
68 | func updateReticle() {
69 |
70 | if (reticleActive) {
71 |
72 | let hitTestResults = sceneView.hitTest(sceneView.center, types: .existingPlaneUsingExtent)
73 | if (hitTestResults.count > 0) {
74 | let hitResult: ARHitTestResult = hitTestResults.first!
75 | reticleNode.transform = SCNMatrix4(hitResult.worldTransform)
76 | reticleNode.isHidden = false
77 | reticleHit = true
78 | }
79 | else {
80 |
81 | reticleHit = false
82 | reticleNode.isHidden = true
83 | }
84 | }
85 | }
86 |
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/BlueLamp/materials.mtl:
--------------------------------------------------------------------------------
1 | newmtl mat4
2 | Kd 0.00 0.74 0.83
3 |
4 | newmtl mat3
5 | Kd 0.50 0.87 0.92
6 |
7 | newmtl mat15
8 | Kd 0.81 0.85 0.86
9 |
10 | newmtl mat13
11 | Kd 1.00 0.60 0.00
12 |
13 | newmtl mat8
14 | Kd 0.96 0.26 0.21
15 |
16 | newmtl mat23
17 | Kd 0.10 0.10 0.10
18 |
19 | newmtl mat24
20 | Ka 0.58 0.65 1.00
21 | Kd 0.92 0.95 0.94
22 | Ks 1 1 1
23 | illum 9
24 | Ns 300
25 | d 0.4
26 | Ni 1.5
27 |
28 | newmtl mat17
29 | Kd 0.27 0.35 0.39
30 |
31 | newmtl mat12
32 | Kd 1.00 0.92 0.23
33 |
34 | newmtl mat16
35 | Kd 0.47 0.56 0.61
36 |
37 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/BlueLamp/model-triangulated.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/BlueLamp/model-triangulated.scn
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/Gramophone/materials.mtl:
--------------------------------------------------------------------------------
1 | newmtl mat20
2 | Kd 0.47 0.33 0.28
3 |
4 | newmtl mat17
5 | Kd 0.27 0.35 0.39
6 |
7 | newmtl mat19
8 | Kd 0.87 0.60 0.27
9 |
10 | newmtl mat18
11 | Kd 1.00 0.80 0.53
12 |
13 | newmtl mat16
14 | Kd 0.47 0.56 0.61
15 |
16 | newmtl mat23
17 | Kd 0.10 0.10 0.10
18 |
19 | newmtl mat8
20 | Kd 0.96 0.26 0.21
21 |
22 | newmtl mat14
23 | Kd 1.00 0.34 0.13
24 |
25 | newmtl mat15
26 | Kd 0.81 0.85 0.86
27 |
28 | newmtl mat22
29 | Kd 0.62 0.62 0.62
30 |
31 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/Gramophone/model-triangulated.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/Gramophone/model-triangulated.scn
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/Plant/PUSHILIN_plant.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: '2.blend'
2 | # Material Count: 1
3 |
4 | newmtl None
5 | Ns 0
6 | Ka 0.000000 0.000000 0.000000
7 | Kd 0.8 0.8 0.8
8 | Ks 0.8 0.8 0.8
9 | d 1
10 | illum 2
11 | map_Kd PUSHILIN_plant.png
12 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/Plant/PUSHILIN_plant.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/Plant/PUSHILIN_plant.png
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/Plant/PUSHILIN_plant.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/Plant/PUSHILIN_plant.scn
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/WoodChair/CHAHIN_WOODEN_CHAIR.mtl:
--------------------------------------------------------------------------------
1 | # Blender MTL File: 'CHAHIN_WOODEN_CHAIR.blend'
2 | # Material Count: 1
3 |
4 | newmtl Material.004
5 | map_Kd CHAHIN_WOODEN_CHAIR_TEXTURE.jpg
6 | Ns 96.078431
7 | Ka 1.000000 1.000000 1.000000
8 | Kd 0.640000 0.640000 0.640000
9 | Ks 0.500000 0.500000 0.500000
10 | Ke 0.000000 0.000000 0.000000
11 | Ni 1.000000
12 | d 1.000000
13 | illum 2
14 |
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/WoodChair/CHAHIN_WOODEN_CHAIR.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/WoodChair/CHAHIN_WOODEN_CHAIR.scn
--------------------------------------------------------------------------------
/DecorateYourRoom/DecorateYourRoom/art.scnassets/WoodChair/CHAHIN_WOODEN_CHAIR_TEXTURE.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/DecorateYourRoom/DecorateYourRoom/art.scnassets/WoodChair/CHAHIN_WOODEN_CHAIR_TEXTURE.jpg
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // HelloWorld
4 | //
5 | // Created by Neil Mathew on 10/10/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PlacenoteSDK
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 |
20 | LibPlacenote.instance.initialize(apiKey: Enter API Key Here, onInitialized: {(initialized: Bool?) -> Void in
21 | if (initialized!) {
22 | print ("SDK Initialized")
23 | }
24 | else {
25 | print ("SDK Could not be initialized")
26 | }
27 | })
28 |
29 | return true
30 | }
31 |
32 | func applicationWillResignActive(_ application: UIApplication) {
33 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
34 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
35 | }
36 |
37 | func applicationDidEnterBackground(_ application: UIApplication) {
38 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
39 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
40 | }
41 |
42 | func applicationWillEnterForeground(_ application: UIApplication) {
43 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
44 | }
45 |
46 | func applicationDidBecomeActive(_ application: UIApplication) {
47 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
48 | }
49 |
50 | func applicationWillTerminate(_ application: UIApplication) {
51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
52 | }
53 |
54 |
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.8
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 | arkit
33 |
34 | UIStatusBarHidden
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/art.scnassets/ship.scn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/HelloWorld/HelloWorld/art.scnassets/ship.scn
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld/art.scnassets/texture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/HelloWorld/HelloWorld/art.scnassets/texture.png
--------------------------------------------------------------------------------
/PlacenoteSDKExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
13 |
14 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PlacenoteSDKExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PlacenoteSDKExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :ios, '11.0'
3 |
4 | workspace 'PlacenoteSDKExample'
5 | xcodeproj 'RandomShapes/RandomShapes.xcodeproj'
6 | xcodeproj 'HelloWorld/HelloWorld.xcodeproj'
7 | xcodeproj 'DecorateYourRoom/DecorateYourRoom.xcodeproj'
8 |
9 | target 'HelloWorld' do
10 | use_frameworks!
11 | xcodeproj 'HelloWorld/HelloWorld.xcodeproj'
12 | pod 'PlacenoteSDK'
13 | end
14 |
15 | target 'DecorateYourRoom' do
16 | use_frameworks!
17 | xcodeproj 'DecorateYourRoom/DecorateYourRoom.xcodeproj'
18 | pod 'PlacenoteSDK'
19 | end
20 |
21 | target 'RandomShapes' do
22 | use_frameworks!
23 | xcodeproj 'RandomShapes/RandomShapes.xcodeproj'
24 | pod 'PlacenoteSDK'
25 | end
26 |
27 | post_install do |installer|
28 | installer.pods_project.targets.each do |target|
29 | target.build_configurations.each do |config|
30 | config.build_settings['ENABLE_BITCODE'] = 'NO'
31 | end
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - PlacenoteSDK (1.8)
3 |
4 | DEPENDENCIES:
5 | - PlacenoteSDK
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - PlacenoteSDK
10 |
11 | SPEC CHECKSUMS:
12 | PlacenoteSDK: 3ec0318de3a1462ea60de6f105254b8e449337bf
13 |
14 | PODFILE CHECKSUM: 0c2316508911dc0b64e9f2df51268e573c09dbe5
15 |
16 | COCOAPODS: 1.8.4
17 |
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - PlacenoteSDK (1.8)
3 |
4 | DEPENDENCIES:
5 | - PlacenoteSDK
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - PlacenoteSDK
10 |
11 | SPEC CHECKSUMS:
12 | PlacenoteSDK: 3ec0318de3a1462ea60de6f105254b8e449337bf
13 |
14 | PODFILE CHECKSUM: 0c2316508911dc0b64e9f2df51268e573c09dbe5
15 |
16 | COCOAPODS: 1.8.4
17 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/CameraManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CameraManager.swift
3 | // PlacenoteSDK
4 | //
5 | // Created by Yan Ma on 2018-01-09.
6 | // Copyright © 2018 Vertical AI. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// A helper class that takes the pose output from the LibPlacenote mapping/localization module
12 | /// and transform the ARKit camera to align the inertial map frame while maintaining high frame rate.
13 | public class CameraManager: PNDelegate {
14 | private let verticesPerCube: Int = 36
15 | private var camera: SCNNode
16 | private var rootNode: SCNNode
17 | private var cameraParent: SCNNode = SCNNode()
18 |
19 | /**
20 | Constructor of the camera manager. Removes the camera node from its parent, and insert an intermediate
21 | SCNNode between the scene's rootnode and the camera node, so that we can rotate the ARKit frame to the
22 | LibPlacenote map frame
23 |
24 | - Parameter scene: The scene we wish the LibPlacenote camera to exist
25 | - Parameter cam: camera node that is controlled by ARKit
26 | */
27 | public init(scene: SCNScene, cam: SCNNode) {
28 | rootNode = scene.rootNode
29 | camera = cam
30 |
31 | rootNode.addChildNode(cameraParent)
32 | cameraParent.position = SCNVector3(0, 0, 0)
33 | cameraParent.addChildNode(camera)
34 |
35 | // IMPORTANT: need to run this line to subscribe to pose and status events
36 | LibPlacenote.instance.multiDelegate += self;
37 | }
38 |
39 | /**
40 | Callback to subscribe to pose measurements from LibPlacenote
41 |
42 | - Parameter outputPose: Inertial pose with respect to the map LibPlacenote is tracking against.
43 | - Parameter arkitPose: Odometry pose with respect to the ARKit coordinate frame that corresponds with 'outputPose' in time.
44 | */
45 | public func onPose(_ outputPose: matrix_float4x4, _ arkitPose: matrix_float4x4) -> Void {
46 | if (LibPlacenote.instance.getStatus() == LibPlacenote.MappingStatus.running) {
47 | cameraParent.simdTransform = outputPose*arkitPose.inverse
48 | }
49 | }
50 |
51 | /**
52 | Callback to subscribe to mapping session status changes.
53 |
54 | - Parameter prevStatus: Status before the status change
55 | - Parameter currStatus: Current status of the mapping engine
56 | */
57 | public func onStatusChange(_ prevStatus: LibPlacenote.MappingStatus, _ currStatus: LibPlacenote.MappingStatus) {
58 |
59 | }
60 |
61 | /**
62 | Callback to subscribe to the first localization event for loading assets
63 | */
64 | public func onLocalized() -> Void {
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Data.bin:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:59a2f843c77bb12452aa071c0b792eb1054cb2f339c2592036a4f5c99907f328
3 | size 8742231
4 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Event.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Event.swift
3 | // PlacenoteSDK
4 | //
5 | // Created by Yan Ma on 2019-10-04
6 | // Author: Colin Eberhardt Credit: https://blog.scottlogic.com/2015/02/05/swift-events.html
7 | //
8 |
9 | import Foundation
10 |
11 | /// An interface to be implemented by Event class to enable cleanup via dispose function.
12 | public protocol Disposable {
13 | /// Implement this function to cleanup the object that inherits this protocol
14 | func dispose()
15 | }
16 |
17 | /// A class that implements event pattern that enables signalling of an event occurs.
18 | public class Event {
19 | /// Alias for a closure that takes the event data payload type and do something with it
20 | public typealias EventHandler = (T) -> ()
21 |
22 | private var eventHandlers = [Invocable]()
23 |
24 | private class EventHandlerWrapper
25 | : Invocable, Disposable {
26 | weak var target: T?
27 | let handler: (T) -> (U) -> ()
28 | let event: Event
29 |
30 | init(target: T?, handler: @escaping (T) -> (U) -> (), event: Event) {
31 | self.target = target
32 | self.handler = handler
33 | self.event = event;
34 | }
35 |
36 | func invoke(data: Any) -> () {
37 | if let t = target {
38 | handler(t)(data as! U)
39 | }
40 | }
41 |
42 | func dispose() {
43 | event.eventHandlers =
44 | event.eventHandlers.filter { $0 !== self }
45 | }
46 | }
47 |
48 | /**
49 | Raise an signal to the list of handlers added to this event.
50 |
51 | - Parameter data: payload to send to the handlers via this signal
52 | */
53 | public func raise(data: T) {
54 | for handler in self.eventHandlers {
55 | handler.invoke(data: data)
56 | }
57 | }
58 |
59 | /**
60 | Add a listener to handle the signal raised by an Event object
61 |
62 | - Parameter target: object reference that subscribe to the event
63 | - Parameter handler: the handler to handle the event
64 | */
65 | public func addHandler(target: U,
66 | handler: @escaping (U) -> EventHandler) -> Disposable {
67 | let wrapper = EventHandlerWrapper(target: target,
68 | handler: handler,
69 | event: self)
70 | eventHandlers.append(wrapper)
71 | return wrapper
72 | }
73 | }
74 |
75 | private protocol Invocable: class {
76 | func invoke(data: Any)
77 | }
78 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/LICENSE:
--------------------------------------------------------------------------------
1 | Free Software License for Binary Distributions
2 | Perceptiv Labs Inc / San Francisco, California
3 |
4 | Revision 1, December 2017
5 |
6 | Definitions
7 | "Software" refers to the collection of files, including, but not
8 | limited to, source code, programs, binary executables, images, and
9 | scripts, which are distributed by Perceptiv Labs Inc.
10 |
11 | "Copyright Holder" is whoever is named in the copyright or copyrights
12 | for the Software.
13 |
14 | "You" is you, if you are thinking about using, copying or distributing
15 | this Software.
16 | _________________________________________________________________
17 |
18 | License Terms
19 |
20 | 1. You may use this Software for commercial or non-commercial
21 | purposes without charge if You accept this License.
22 | 2. You are not required to accept this License, since You have not
23 | signed it. However, nothing else grants You permission to use or
24 | distribute the Software or its derivative works. These actions are
25 | prohibited by law if You do not accept this License. Therefore, by
26 | using or distributing the Software (or any work based on the
27 | Software), You indicate your acceptance of this License to do so,
28 | and all its terms and conditions for copying, distributing or
29 | using the Software or works based on it.
30 | 3. You may not copy, modify, sublicense, or distribute the Software
31 | except as expressly provided under this License. Any attempt
32 | otherwise to copy, modify, sublicense or distribute the Software
33 | is void, and will automatically terminate your rights under this
34 | License.
35 | 4. You may make binary copies of this Software and individual parts
36 | of this Software for your own purpose without restriction.
37 | 5. If you wish to incorporate parts of the Software into other
38 | programs and/or if you wish to obtain the source code, write to
39 | the author.
40 | 6. You may distribute this Software as a whole, provided that:
41 | a. it includes all of the original Copyright Notices and
42 | associated Disclaimers and License documents;
43 | b. You leave the original Software distribution unmodified;
44 | c. and it includes all accompanying documentation.
45 | 7. You may charge a reasonable copying fee for any distribution of
46 | this Software. You may not charge a fee for this Software itself.
47 | However, You may distribute this Software in aggregate with other
48 | (possibly commercial) programs as part of a larger (possibly
49 | commercial) software distribution provided that You do not
50 | advertise this Software as a product of your own.
51 | 8. The name of the Copyright Holder may not be used to endorse or
52 | promote products derived from this software without specific prior
53 | written permission.
54 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
55 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
56 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
57 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
58 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
59 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
60 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
61 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
62 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
63 | OR CORRECTION.
64 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
65 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
66 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
67 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
68 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
69 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
70 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
71 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
72 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
73 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
74 | 11. This License is governed by the laws of California, USA,
75 | excluding choice of law rules. If any part of this License is
76 | found to be in conflict with the law, that part shall be
77 | interpreted in its broadest meaning consistent with the law, and
78 | no other parts of the License shall be affected.
79 | _________________________________________________________________
80 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/LocalizationThumbnailSelector.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LocalizationThumbnailSelector.swift
3 | // PlacenoteSDK
4 | //
5 | // Created by Yan Ma on 2019-09-13.
6 | //
7 |
8 | import Foundation
9 | import VideoToolbox
10 | import os.log
11 |
12 | /// A helper class that selects a localization thumbnail for the current map by picking the frame that tracks
13 | /// the most good features
14 | public class LocalizationThumbnailSelector: PNDelegate {
15 | private var maxLmSize: Int = -1
16 | private var newThumbnailEvent: Event = Event()
17 |
18 | /// accessor to new thumbnail event to return the latest thumbnail texture for visualization purposes
19 | public var onNewThumbnail: Event {
20 | get {
21 | return newThumbnailEvent
22 | }
23 | }
24 |
25 | /**
26 | Constructor.
27 | */
28 | public init() {
29 | // IMPORTANT: need to run this line to subscribe to pose and status events
30 | LibPlacenote.instance.multiDelegate += self;
31 | }
32 |
33 | private func setCurrentImageAsThumbnail() {
34 | LibPlacenote.instance.setLocalizationThumbnail();
35 | LibPlacenote.instance.getLocalizationThumbnail(thumbnailCb: {(thumbnail: UIImage?) -> Void in
36 | self.newThumbnailEvent.raise(data: thumbnail)
37 | });
38 | }
39 |
40 | /**
41 | Callback to subscribe to pose measurements from LibPlacenote
42 |
43 | - Parameter outputPose: Inertial pose with respect to the map LibPlacenote is tracking against.
44 | - Parameter arkitPose: Odometry pose with respect to the ARKit coordinate frame that corresponds with 'outputPose' in time.
45 | */
46 | public func onPose(_ outputPose: matrix_float4x4, _ arkitPose: matrix_float4x4) -> Void {
47 | if (LibPlacenote.instance.getMode() != LibPlacenote.MappingMode.mapping) {
48 | return
49 | }
50 |
51 | let landmarks = LibPlacenote.instance.getTrackedFeatures();
52 | if (landmarks.count > maxLmSize) {
53 | maxLmSize = landmarks.count
54 | os_log("Updated thumbnail with %d", log: OSLog.default, type: .error, maxLmSize)
55 | setCurrentImageAsThumbnail()
56 | }
57 | }
58 |
59 | /**
60 | Callback to subscribe to mapping session status changes.
61 |
62 | - Parameter prevStatus: Status before the status change
63 | - Parameter currStatus: Current status of the mapping engine
64 | */
65 | public func onStatusChange(_ prevStatus: LibPlacenote.MappingStatus, _ currStatus: LibPlacenote.MappingStatus) {
66 | if (prevStatus != LibPlacenote.MappingStatus.waiting && currStatus == LibPlacenote.MappingStatus.waiting) {
67 | maxLmSize = -1;
68 | }
69 | else if (prevStatus == LibPlacenote.MappingStatus.waiting) {
70 | if (LibPlacenote.instance.getMode() == LibPlacenote.MappingMode.localizing) {
71 | LibPlacenote.instance.getLocalizationThumbnail(thumbnailCb: {(thumbnail: UIImage?) -> Void in
72 | self.newThumbnailEvent.raise(data: thumbnail)
73 | });
74 | }
75 | }
76 | }
77 |
78 | /**
79 | Callback to subscribe to the first localization event for loading assets
80 | */
81 | public func onLocalized() -> Void {
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/MulticastDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MulticastDelegate.swift
3 | // PlacenoteSDK referenced from http://www.gregread.com/2016/02/23/multicast-delegates-in-swift/#Option_2_8211_A_Better_Way
4 | //
5 | // Created by Yan Ma on 2018-01-09.
6 | // Copyright © 2018 Vertical AI. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 |
12 | /// A helper class that wraps around multiple PNDelegates to with convenient
13 | /// utility operators to append and remove delegates to/from the list
14 | public class MulticastPNDelegate {
15 | private var delegates = [PNDelegate]()
16 |
17 | /**
18 | A function to append delegate to the multicast delegate
19 |
20 | - Parameter delegate: A PNDelegate to be appended
21 | */
22 | public func addDelegate(delegate: PNDelegate) {
23 | // If delegate is a class, add it to our weak reference array
24 | delegates.append(delegate)
25 | }
26 |
27 | /**
28 | A function to remove delegate to the multicast delegate
29 |
30 | - Parameter delegate: A PNDelegate to be removed
31 | */
32 | public func removeDelegate(delegate: PNDelegate) {
33 | for (index, delegateInArray) in delegates.enumerated().reversed() {
34 | // If we have a match, remove the delegate from our array
35 | if ((delegateInArray as AnyObject) === (delegate as AnyObject)) {
36 | delegates.remove(at: index)
37 | }
38 | }
39 | }
40 |
41 | /**
42 | Callback to subscribe to pose measurements from LibPlacenote and broadcast it to the subscribed child delegates
43 |
44 | - Parameter outputPose: Inertial pose with respect to the map LibPlacenote is tracking against.
45 | - Parameter arkitPose: Odometry pose with respect to the ARKit coordinate frame that corresponds with 'outputPose' in time.
46 | */
47 | func onPose(outputPose: matrix_float4x4, arkitPose: matrix_float4x4) -> Void {
48 | for del in delegates {
49 | del.onPose(outputPose, arkitPose)
50 | }
51 | }
52 |
53 | /**
54 | Callback to subscribe to mapping session status changes and broadcast it to the subscribed child delegates
55 |
56 | - Parameter prevStatus: Status before the status change
57 | - Parameter currStatus: Current status of the mapping engine
58 | */
59 | func onStatusChange(prevStatus: LibPlacenote.MappingStatus, currStatus: LibPlacenote.MappingStatus) -> Void {
60 | for del in delegates {
61 | del.onStatusChange(prevStatus, currStatus)
62 | }
63 | }
64 |
65 | /**
66 | Callback to subscribe to the first localization event for loading assets
67 | */
68 | func onLocalized() -> Void {
69 | for del in delegates {
70 | del.onLocalized()
71 | }
72 | }
73 | }
74 |
75 | /**
76 | += operator to append delegate to the multicast delegate
77 |
78 | - Parameter delegate: A PNDelegate to be appended
79 | */
80 | public func += (left: MulticastPNDelegate, right: PNDelegate) {
81 | left.addDelegate(delegate: right)
82 | }
83 |
84 | /**
85 | -= operatorto remove delegate to the multicast delegate
86 |
87 | - Parameter delegate: A PNDelegate to be removed
88 | */
89 | public func -= (left: MulticastPNDelegate, right: PNDelegate) {
90 | left.removeDelegate(delegate: right)
91 | }
92 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/Headers/Placenote.h:
--------------------------------------------------------------------------------
1 | //
2 | // Placenote.h
3 | // Placenote
4 | //
5 | // Created by Brad Hoekstra on 2018-01-17.
6 | // Copyright © 2018 Yan Ma. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Placenote.
12 | FOUNDATION_EXPORT double PlacenoteVersionNumber;
13 |
14 | //! Project version string for Placenote.
15 | FOUNDATION_EXPORT const unsigned char PlacenoteVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/Headers/libPlacenote.h:
--------------------------------------------------------------------------------
1 | //
2 | // LibPlacenote.h
3 | // C header of LibPlacenote SDK
4 | //
5 | // Created by Yan Ma on 2017-09-01.
6 | // Copyright © 2017 Vertical AI. All rights reserved.
7 |
8 | #ifndef LIBPLACENOTE_H
9 | #define LIBPLACENOTE_H
10 |
11 | #include
12 |
13 | #ifndef FOUNDATION_EXPORT
14 | #ifdef __cplusplus
15 | #define FOUNDATION_EXPORT extern "C"
16 | #else
17 | #define FOUNDATION_EXPORT extern
18 | #endif
19 | #endif
20 |
21 |
22 | typedef struct PNCameraInstrinsics_t
23 | {
24 | int width;
25 | int height;
26 |
27 | double fx;
28 | double fy;
29 | double cx;
30 | double cy;
31 | double k1;
32 | double k2;
33 | double p1;
34 | double p2;
35 | } PNCameraInstrinsics;
36 |
37 | typedef struct PNInitParams_t
38 | {
39 | const char* apiKey;
40 | const char* appBasePath;
41 | const char* mapPath;
42 | } PNInitParams;
43 |
44 | typedef struct PNCallbackResult_t
45 | {
46 | bool success;
47 | const char* msg;
48 | } PNCallbackResult;
49 |
50 | typedef struct PNVector3_t
51 | {
52 | float x;
53 | float y;
54 | float z;
55 | } PNVector3;
56 |
57 | typedef struct PNQuaternion_t
58 | {
59 | float x;
60 | float y;
61 | float z;
62 | float w;
63 | } PNQuaternion;
64 |
65 | typedef struct PNTransform_t
66 | {
67 | PNVector3 position;
68 | PNQuaternion rotation;
69 | } PNTransform;
70 |
71 | typedef struct PNImagePlane_t
72 | {
73 | void* buf;
74 | int width;
75 | int height;
76 | int stride;
77 | } PNImagePlane;
78 |
79 | typedef struct PNFeaturePoint_t
80 | {
81 | int idx;
82 | int measCount;
83 | float maxViewAngle;
84 | PNVector3 point;
85 | } PNFeaturePoint;
86 |
87 | typedef struct PNKeyframe_t
88 | {
89 | int idx;
90 | PNTransform pose;
91 | } PNKeyframe;
92 |
93 | typedef struct PNTransferStatus_t
94 | {
95 | const char* mapId;
96 | bool completed;
97 | bool faulted;
98 | int bytesTransferred;
99 | int bytesTotal;
100 | } PNTransferStatus;
101 |
102 | typedef void (*result_callback) (PNCallbackResult* result, void* context);
103 | typedef void (*transfer_map_callback) (PNTransferStatus* status, void* context);
104 | typedef void (*pose_callback) (PNTransform* placenotePose, PNTransform* arkitPose, void* context);
105 |
106 |
107 | FOUNDATION_EXPORT int PNInitialize(PNInitParams* params, result_callback cb, void* context);
108 | FOUNDATION_EXPORT int PNGetStatus ();
109 | FOUNDATION_EXPORT int PNGetTrackedLandmarks (PNFeaturePoint* points, int size);
110 | FOUNDATION_EXPORT int PNGetAllLandmarks (PNFeaturePoint* points, int size);
111 | FOUNDATION_EXPORT int PNListMaps (result_callback cb, void* context);
112 | FOUNDATION_EXPORT int PNSearchMaps (const char* searchJson, result_callback cb, void* context);
113 | FOUNDATION_EXPORT int PNSaveMap (const char* mapId, transfer_map_callback cb, void* context);
114 | FOUNDATION_EXPORT int PNLoadMap (const char* mapId, transfer_map_callback cb, void* context);
115 | FOUNDATION_EXPORT int PNDeleteMap (const char* mapId, result_callback cb, void* context);
116 | FOUNDATION_EXPORT int PNAddMap (result_callback cb, void* context);
117 | FOUNDATION_EXPORT int PNSyncThumbnail(const char* mapId, const char* thumbnailPath,
118 | transfer_map_callback cb, void* context);
119 | FOUNDATION_EXPORT int PNSyncAsset(const char* mapId, const char* assetFilePath,
120 | transfer_map_callback cb, void* context);
121 | FOUNDATION_EXPORT int PNStartSession (pose_callback cb, bool extending, void* context);
122 | FOUNDATION_EXPORT int PNStopSession ();
123 | FOUNDATION_EXPORT int PNStartRecordDataset(transfer_map_callback cb, void* context);
124 | FOUNDATION_EXPORT int PNGetMetadata (const char* mapId, result_callback cb, void* context);
125 | FOUNDATION_EXPORT int PNSetMetadata (const char* mapId, const char* metadataUnvalidated, result_callback cb, void* context);
126 | FOUNDATION_EXPORT int PNGetPose(PNTransform* transform);
127 | FOUNDATION_EXPORT int PNSetIntrinsics(PNCameraInstrinsics* instrinsics);
128 | FOUNDATION_EXPORT int PNSetFrame(PNImagePlane* yPlane, PNImagePlane* vuPlane, PNTransform* arPose);
129 | FOUNDATION_EXPORT int PNShutdown();
130 |
131 |
132 | #endif // LIBPLACENOTE_H
133 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Placenote/PlacenoteSDK-iOS/e9b57262a979300255134648f12da001cdb0c42b/Pods/PlacenoteSDK/Placenote.framework/Info.plist
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module Placenote {
2 | umbrella header "Placenote.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/Placenote:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:22691cbbe87c3f69fb13159df44f0f5832d61e3ba549b3424b1ff804dc12a6e6
3 | size 8184048
4 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/Placenote.framework/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | Headers/Placenote.h
8 |
9 | En6ZeTNirflaFP+ZkcO291IqkXE=
10 |
11 | Headers/libPlacenote.h
12 |
13 | dmsRyNLh3X6OvATdAIoiDGqdzco=
14 |
15 | Info.plist
16 |
17 | Bypx9wOJGMAjuBIqc1nDEIkjSY0=
18 |
19 | Modules/module.modulemap
20 |
21 | 7Y58iNxAz5P3ISzEWCSB6z4NG9E=
22 |
23 |
24 | files2
25 |
26 | Headers/Placenote.h
27 |
28 | hash2
29 |
30 | dSGanwvUdGeoddwCMZejkMIgQ1oWmDmujPigAgDyMoI=
31 |
32 |
33 | Headers/libPlacenote.h
34 |
35 | hash2
36 |
37 | bBMKyFlu4/s5ZatUDUzUL6fhIctmnEduqB7dwMOglk0=
38 |
39 |
40 | Modules/module.modulemap
41 |
42 | hash2
43 |
44 | zIlJpdS78cE1vAOESS/BX/tEMXqyKqZu9PYmyv1bMtA=
45 |
46 |
47 |
48 | rules
49 |
50 | ^.*
51 |
52 | ^.*\.lproj/
53 |
54 | optional
55 |
56 | weight
57 | 1000
58 |
59 | ^.*\.lproj/locversion.plist$
60 |
61 | omit
62 |
63 | weight
64 | 1100
65 |
66 | ^Base\.lproj/
67 |
68 | weight
69 | 1010
70 |
71 | ^version.plist$
72 |
73 |
74 | rules2
75 |
76 | .*\.dSYM($|/)
77 |
78 | weight
79 | 11
80 |
81 | ^(.*/)?\.DS_Store$
82 |
83 | omit
84 |
85 | weight
86 | 2000
87 |
88 | ^.*
89 |
90 | ^.*\.lproj/
91 |
92 | optional
93 |
94 | weight
95 | 1000
96 |
97 | ^.*\.lproj/locversion.plist$
98 |
99 | omit
100 |
101 | weight
102 | 1100
103 |
104 | ^Base\.lproj/
105 |
106 | weight
107 | 1010
108 |
109 | ^Info\.plist$
110 |
111 | omit
112 |
113 | weight
114 | 20
115 |
116 | ^PkgInfo$
117 |
118 | omit
119 |
120 | weight
121 | 20
122 |
123 | ^embedded\.provisionprofile$
124 |
125 | weight
126 | 20
127 |
128 | ^version\.plist$
129 |
130 | weight
131 | 20
132 |
133 |
134 |
135 |
136 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/UIImageUtil.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageUtil.swift
3 | // PlacenoteSDK
4 | //
5 | // Created by Yan Ma on 2019-09-17.
6 | //
7 |
8 | import Foundation
9 | import VideoToolbox
10 | import Accelerate
11 |
12 | /// Extensions to UIImage to provide extra utilities to UIImage
13 | extension UIImage {
14 | /**
15 | Constructor that converts a CVPixelBuffer to a UIImage
16 |
17 | - Parameter pixelBuffer: a pixel buffer to be converted into a UIImage
18 | */
19 | public convenience init?(pixelBuffer: CVPixelBuffer) {
20 | var cgImage: CGImage?
21 | VTCreateCGImageFromCVPixelBuffer(pixelBuffer, nil, &cgImage)
22 |
23 | if let cgImage = cgImage {
24 | self.init(cgImage: cgImage)
25 | } else {
26 | return nil
27 | }
28 | }
29 |
30 | /**
31 | Resize a UIImage to the size given by the parameter
32 |
33 | - Parameter size: target size for the resize operation
34 | */
35 | func resize(size:CGSize) -> UIImage? {
36 | let cgImage = self.cgImage!
37 | var format = vImage_CGImageFormat(bitsPerComponent: 8, bitsPerPixel: 32, colorSpace: nil, bitmapInfo: CGBitmapInfo(rawValue: CGImageAlphaInfo.first.rawValue), version: 0, decode: nil, renderingIntent: CGColorRenderingIntent.defaultIntent)
38 | var sourceBuffer = vImage_Buffer()
39 | defer {
40 | free(sourceBuffer.data)
41 | }
42 | var error = vImageBuffer_InitWithCGImage(&sourceBuffer, &format, nil, cgImage, numericCast(kvImageNoFlags))
43 | guard error == kvImageNoError else { return nil }
44 | // create a destination buffer
45 | let scale = self.scale
46 | let destWidth = Int(size.width)
47 | let destHeight = Int(size.height)
48 | let bytesPerPixel = self.cgImage!.bitsPerPixel/8
49 | let destBytesPerRow = destWidth * bytesPerPixel
50 | let destData = UnsafeMutablePointer.allocate(capacity: destHeight * destBytesPerRow)
51 | defer {
52 | destData.deallocate()
53 | }
54 | var destBuffer = vImage_Buffer(data: destData, height: vImagePixelCount(destHeight), width: vImagePixelCount(destWidth), rowBytes: destBytesPerRow)
55 | // scale the image
56 | error = vImageScale_ARGB8888(&sourceBuffer, &destBuffer, nil, numericCast(kvImageHighQualityResampling))
57 | guard error == kvImageNoError else { return nil }
58 | // create a CGImage from vImage_Buffer
59 | var destCGImage = vImageCreateCGImageFromBuffer(&destBuffer, &format, nil, nil, numericCast(kvImageNoFlags), &error)?.takeRetainedValue()
60 | guard error == kvImageNoError else { return nil }
61 | // create a UIImage
62 | let resizedImage = destCGImage.flatMap { UIImage(cgImage: $0, scale: 0.0, orientation: self.imageOrientation) }
63 | destCGImage = nil
64 | return resizedImage
65 | }
66 |
67 | /**
68 | Rotate a UIImage by the angle given by the radians parameter
69 |
70 | - Parameter radians: amount of radians to rotate the image
71 | */
72 | func rotate(radians: CGFloat) -> UIImage {
73 | let rotatedSize = CGRect(origin: .zero, size: size)
74 | .applying(CGAffineTransform(rotationAngle: CGFloat(radians)))
75 | .integral.size
76 | UIGraphicsBeginImageContext(rotatedSize)
77 | if let context = UIGraphicsGetCurrentContext() {
78 | let origin = CGPoint(x: rotatedSize.width / 2.0,
79 | y: rotatedSize.height / 2.0)
80 | context.translateBy(x: origin.x, y: origin.y)
81 | context.rotate(by: radians)
82 | draw(in: CGRect(x: -origin.y, y: -origin.x,
83 | width: size.width, height: size.height))
84 | let rotatedImage = UIGraphicsGetImageFromCurrentImageContext()
85 | UIGraphicsEndImageContext()
86 |
87 | return rotatedImage ?? self
88 | }
89 |
90 | return self
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/Pods/PlacenoteSDK/include/PlacenoteSDK-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlacenoteSDK-Bridging-Header.h
3 | // Shape Dropper (Placenote SDK iOS Sample)
4 | //
5 | // Created by Prasenjit Mukherjee on 2017-09-01.
6 | // Copyright © 2017 Vertical AI. All rights reserved.
7 |
8 | #ifndef PLACENOTE_SDK_BRIDGE
9 | #define PLACENOTE_SDK_BRIDGE
10 |
11 | #include
12 | #include
13 | #include "libPlacenote.h"
14 | #import
15 | #import
16 | #import
17 |
18 | enum Status{INVALID, GOOD, BAD, DELETED};
19 |
20 | void initializeSDK(const char* apiKey, const char* mapPath, const char* appBasePath, void* swiftContext, result_callback cb)
21 | {
22 | PNInitParams params;
23 |
24 | params.apiKey = apiKey;
25 | params.appBasePath = appBasePath;
26 | params.mapPath = mapPath;
27 |
28 | PNInitialize (¶ms, cb, swiftContext);
29 | }
30 |
31 |
32 | void setIntrinsicsNative(int width, int height, matrix_float3x3 calibMat)
33 | {
34 | PNCameraInstrinsics intrinsics;
35 | intrinsics.width = width;
36 | intrinsics.height = height;
37 | intrinsics.fx = calibMat.columns[0].x;
38 | intrinsics.fy = calibMat.columns[1].y;
39 | intrinsics.cx = calibMat.columns[2].x;
40 | intrinsics.cy = calibMat.columns[2].y;
41 | intrinsics.k1 = intrinsics.k2 = intrinsics.p1 = intrinsics.p2 = 0.0f;
42 |
43 | PNSetIntrinsics(&intrinsics);
44 | }
45 |
46 |
47 | void setFrameNative(CVPixelBufferRef frameBuffer, SCNVector3 position, SCNVector4 rotation)
48 | {
49 | int yWidth = CVPixelBufferGetWidthOfPlane (frameBuffer, 0);
50 | int uvWidth = CVPixelBufferGetWidthOfPlane (frameBuffer, 1);
51 | int yHeight = CVPixelBufferGetHeightOfPlane(frameBuffer,0);
52 | int uvHeight = CVPixelBufferGetHeightOfPlane(frameBuffer,1);
53 | int yStride = CVPixelBufferGetBytesPerRowOfPlane (frameBuffer, 0);
54 | int uvStride = CVPixelBufferGetBytesPerRowOfPlane (frameBuffer, 1);
55 |
56 | unsigned long numBytesY = yStride * yHeight;
57 | unsigned long numBytesUV = uvStride * uvHeight;
58 |
59 | uint8_t* yPixelBytes = (uint8_t*)malloc(numBytesY);
60 | uint8_t* uvPixelBytes = (uint8_t*)malloc(numBytesUV);
61 |
62 | CVPixelBufferLockBaseAddress(frameBuffer, kCVPixelBufferLock_ReadOnly);
63 |
64 | unsigned long numBytes = CVPixelBufferGetBytesPerRowOfPlane (frameBuffer, 0) * CVPixelBufferGetHeightOfPlane(frameBuffer,0);
65 | void* baseAddressY = CVPixelBufferGetBaseAddressOfPlane(frameBuffer,0);
66 | memcpy(yPixelBytes, baseAddressY, numBytesY);
67 | void* baseAddressUV = CVPixelBufferGetBaseAddressOfPlane(frameBuffer,1);
68 | memcpy(uvPixelBytes, baseAddressUV, numBytesUV);
69 | CVPixelBufferUnlockBaseAddress(frameBuffer, 0);
70 |
71 | PNImagePlane yPlane, vuPlane;
72 | yPlane.buf = yPixelBytes;
73 | yPlane.width = yWidth;
74 | yPlane.height = yHeight;
75 | yPlane.stride = yStride;
76 |
77 | vuPlane.buf = uvPixelBytes;
78 | vuPlane.width = uvWidth;
79 | vuPlane.height = uvHeight;
80 | vuPlane.stride = uvStride;
81 |
82 | PNTransform arkitPose;
83 | arkitPose.position.x = position.x;
84 | arkitPose.position.y = position.y;
85 | arkitPose.position.z = position.z;
86 | arkitPose.rotation.x = rotation.x;
87 | arkitPose.rotation.y = rotation.y;
88 | arkitPose.rotation.z = rotation.z;
89 | arkitPose.rotation.w = rotation.w;
90 |
91 | PNSetFrame(&yPlane, &vuPlane, &arkitPose);
92 | free(yPixelBytes);
93 | free(uvPixelBytes);
94 | }
95 |
96 |
97 | PNTransform getPoseNative() {
98 | PNTransform pose;
99 | PNGetPose(&pose);
100 | return pose;
101 | }
102 |
103 |
104 | #endif // PLACENOTE_SDK_BRIDGE
105 |
106 |
107 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.6.12
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.8.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_PlacenoteSDK : NSObject
3 | @end
4 | @implementation PodsDummy_PlacenoteSDK
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "PlacenoteSDK-Bridging-Header.h"
14 | #import "libPlacenote.h"
15 |
16 | FOUNDATION_EXPORT double PlacenoteSDKVersionNumber;
17 | FOUNDATION_EXPORT const unsigned char PlacenoteSDKVersionString[];
18 |
19 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK.modulemap:
--------------------------------------------------------------------------------
1 | framework module PlacenoteSDK {
2 | umbrella header "PlacenoteSDK-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/PlacenoteSDK/PlacenoteSDK.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_LDFLAGS = $(inherited) -framework "Placenote"
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/PlacenoteSDK
10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | SKIP_INSTALL = YES
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## PlacenoteSDK
5 |
6 | Free Software License for Binary Distributions
7 | Perceptiv Labs Inc / San Francisco, California
8 |
9 | Revision 1, December 2017
10 |
11 | Definitions
12 | "Software" refers to the collection of files, including, but not
13 | limited to, source code, programs, binary executables, images, and
14 | scripts, which are distributed by Perceptiv Labs Inc.
15 |
16 | "Copyright Holder" is whoever is named in the copyright or copyrights
17 | for the Software.
18 |
19 | "You" is you, if you are thinking about using, copying or distributing
20 | this Software.
21 | _________________________________________________________________
22 |
23 | License Terms
24 |
25 | 1. You may use this Software for commercial or non-commercial
26 | purposes without charge if You accept this License.
27 | 2. You are not required to accept this License, since You have not
28 | signed it. However, nothing else grants You permission to use or
29 | distribute the Software or its derivative works. These actions are
30 | prohibited by law if You do not accept this License. Therefore, by
31 | using or distributing the Software (or any work based on the
32 | Software), You indicate your acceptance of this License to do so,
33 | and all its terms and conditions for copying, distributing or
34 | using the Software or works based on it.
35 | 3. You may not copy, modify, sublicense, or distribute the Software
36 | except as expressly provided under this License. Any attempt
37 | otherwise to copy, modify, sublicense or distribute the Software
38 | is void, and will automatically terminate your rights under this
39 | License.
40 | 4. You may make binary copies of this Software and individual parts
41 | of this Software for your own purpose without restriction.
42 | 5. If you wish to incorporate parts of the Software into other
43 | programs and/or if you wish to obtain the source code, write to
44 | the author.
45 | 6. You may distribute this Software as a whole, provided that:
46 | a. it includes all of the original Copyright Notices and
47 | associated Disclaimers and License documents;
48 | b. You leave the original Software distribution unmodified;
49 | c. and it includes all accompanying documentation.
50 | 7. You may charge a reasonable copying fee for any distribution of
51 | this Software. You may not charge a fee for this Software itself.
52 | However, You may distribute this Software in aggregate with other
53 | (possibly commercial) programs as part of a larger (possibly
54 | commercial) software distribution provided that You do not
55 | advertise this Software as a product of your own.
56 | 8. The name of the Copyright Holder may not be used to endorse or
57 | promote products derived from this software without specific prior
58 | written permission.
59 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
60 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
61 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
62 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
63 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
64 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
65 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
66 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
67 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
68 | OR CORRECTION.
69 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
70 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
71 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
72 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
73 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
74 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
75 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
76 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
77 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
78 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
79 | 11. This License is governed by the laws of California, USA,
80 | excluding choice of law rules. If any part of this License is
81 | found to be in conflict with the law, that part shall be
82 | interpreted in its broadest meaning consistent with the law, and
83 | no other parts of the License shall be affected.
84 | _________________________________________________________________
85 |
86 | Generated by CocoaPods - https://cocoapods.org
87 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Free Software License for Binary Distributions
18 | Perceptiv Labs Inc / San Francisco, California
19 |
20 | Revision 1, December 2017
21 |
22 | Definitions
23 | "Software" refers to the collection of files, including, but not
24 | limited to, source code, programs, binary executables, images, and
25 | scripts, which are distributed by Perceptiv Labs Inc.
26 |
27 | "Copyright Holder" is whoever is named in the copyright or copyrights
28 | for the Software.
29 |
30 | "You" is you, if you are thinking about using, copying or distributing
31 | this Software.
32 | _________________________________________________________________
33 |
34 | License Terms
35 |
36 | 1. You may use this Software for commercial or non-commercial
37 | purposes without charge if You accept this License.
38 | 2. You are not required to accept this License, since You have not
39 | signed it. However, nothing else grants You permission to use or
40 | distribute the Software or its derivative works. These actions are
41 | prohibited by law if You do not accept this License. Therefore, by
42 | using or distributing the Software (or any work based on the
43 | Software), You indicate your acceptance of this License to do so,
44 | and all its terms and conditions for copying, distributing or
45 | using the Software or works based on it.
46 | 3. You may not copy, modify, sublicense, or distribute the Software
47 | except as expressly provided under this License. Any attempt
48 | otherwise to copy, modify, sublicense or distribute the Software
49 | is void, and will automatically terminate your rights under this
50 | License.
51 | 4. You may make binary copies of this Software and individual parts
52 | of this Software for your own purpose without restriction.
53 | 5. If you wish to incorporate parts of the Software into other
54 | programs and/or if you wish to obtain the source code, write to
55 | the author.
56 | 6. You may distribute this Software as a whole, provided that:
57 | a. it includes all of the original Copyright Notices and
58 | associated Disclaimers and License documents;
59 | b. You leave the original Software distribution unmodified;
60 | c. and it includes all accompanying documentation.
61 | 7. You may charge a reasonable copying fee for any distribution of
62 | this Software. You may not charge a fee for this Software itself.
63 | However, You may distribute this Software in aggregate with other
64 | (possibly commercial) programs as part of a larger (possibly
65 | commercial) software distribution provided that You do not
66 | advertise this Software as a product of your own.
67 | 8. The name of the Copyright Holder may not be used to endorse or
68 | promote products derived from this software without specific prior
69 | written permission.
70 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
71 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
72 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
73 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
74 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
75 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
76 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
77 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
78 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
79 | OR CORRECTION.
80 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
81 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
82 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
83 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
84 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
85 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
86 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
87 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
88 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
89 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
90 | 11. This License is governed by the laws of California, USA,
91 | excluding choice of law rules. If any part of this License is
92 | found to be in conflict with the law, that part shall be
93 | interpreted in its broadest meaning consistent with the law, and
94 | no other parts of the License shall be affected.
95 | _________________________________________________________________
96 |
97 | License
98 | Placenote EULA
99 | Title
100 | PlacenoteSDK
101 | Type
102 | PSGroupSpecifier
103 |
104 |
105 | FooterText
106 | Generated by CocoaPods - https://cocoapods.org
107 | Title
108 |
109 | Type
110 | PSGroupSpecifier
111 |
112 |
113 | StringsTable
114 | Acknowledgements
115 | Title
116 | Acknowledgements
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_DecorateYourRoom : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_DecorateYourRoom
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # frameworks to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
19 |
20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
22 |
23 | # Used as a return value for each invocation of `strip_invalid_archs` function.
24 | STRIP_BINARY_RETVAL=0
25 |
26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
29 |
30 | # Copies and strips a vendored framework
31 | install_framework()
32 | {
33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
34 | local source="${BUILT_PRODUCTS_DIR}/$1"
35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
37 | elif [ -r "$1" ]; then
38 | local source="$1"
39 | fi
40 |
41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
42 |
43 | if [ -L "${source}" ]; then
44 | echo "Symlinked..."
45 | source="$(readlink "${source}")"
46 | fi
47 |
48 | # Use filter instead of exclude so missing patterns don't throw errors.
49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
51 |
52 | local basename
53 | basename="$(basename -s .framework "$1")"
54 | binary="${destination}/${basename}.framework/${basename}"
55 |
56 | if ! [ -r "$binary" ]; then
57 | binary="${destination}/${basename}"
58 | elif [ -L "${binary}" ]; then
59 | echo "Destination binary is symlinked..."
60 | dirname="$(dirname "${binary}")"
61 | binary="${dirname}/$(readlink "${binary}")"
62 | fi
63 |
64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
66 | strip_invalid_archs "$binary"
67 | fi
68 |
69 | # Resign the code if required by the build settings to avoid unstable apps
70 | code_sign_if_enabled "${destination}/$(basename "$1")"
71 |
72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
74 | local swift_runtime_libs
75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
76 | for lib in $swift_runtime_libs; do
77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
79 | code_sign_if_enabled "${destination}/${lib}"
80 | done
81 | fi
82 | }
83 |
84 | # Copies and strips a vendored dSYM
85 | install_dsym() {
86 | local source="$1"
87 | if [ -r "$source" ]; then
88 | # Copy the dSYM into a the targets temp dir.
89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
91 |
92 | local basename
93 | basename="$(basename -s .framework.dSYM "$source")"
94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
95 |
96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
98 | strip_invalid_archs "$binary"
99 | fi
100 |
101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
102 | # Move the stripped file into its final destination.
103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
105 | else
106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
108 | fi
109 | fi
110 | }
111 |
112 | # Copies the bcsymbolmap files of a vendored framework
113 | install_bcsymbolmap() {
114 | local bcsymbolmap_path="$1"
115 | local destination="${BUILT_PRODUCTS_DIR}"
116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
118 | }
119 |
120 | # Signs a framework with the provided identity
121 | code_sign_if_enabled() {
122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
123 | # Use the current code_sign_identity
124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
126 |
127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
128 | code_sign_cmd="$code_sign_cmd &"
129 | fi
130 | echo "$code_sign_cmd"
131 | eval "$code_sign_cmd"
132 | fi
133 | }
134 |
135 | # Strip invalid architectures
136 | strip_invalid_archs() {
137 | binary="$1"
138 | # Get architectures for current target binary
139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
140 | # Intersect them with the architectures we are building for
141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
142 | # If there are no archs supported by this binary then warn the user
143 | if [[ -z "$intersected_archs" ]]; then
144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
145 | STRIP_BINARY_RETVAL=0
146 | return
147 | fi
148 | stripped=""
149 | for arch in $binary_archs; do
150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
151 | # Strip non-valid architectures in-place
152 | lipo -remove "$arch" -output "$binary" "$binary"
153 | stripped="$stripped $arch"
154 | fi
155 | done
156 | if [[ "$stripped" ]]; then
157 | echo "Stripped $binary of architectures:$stripped"
158 | fi
159 | STRIP_BINARY_RETVAL=1
160 | }
161 |
162 |
163 | if [[ "$CONFIGURATION" == "Debug" ]]; then
164 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
165 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
166 | fi
167 | if [[ "$CONFIGURATION" == "Release" ]]; then
168 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
169 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
170 | fi
171 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
172 | wait
173 | fi
174 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # resources to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13 |
14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
15 | > "$RESOURCES_TO_COPY"
16 |
17 | XCASSET_FILES=()
18 |
19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
22 |
23 | case "${TARGETED_DEVICE_FAMILY:-}" in
24 | 1,2)
25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
26 | ;;
27 | 1)
28 | TARGET_DEVICE_ARGS="--target-device iphone"
29 | ;;
30 | 2)
31 | TARGET_DEVICE_ARGS="--target-device ipad"
32 | ;;
33 | 3)
34 | TARGET_DEVICE_ARGS="--target-device tv"
35 | ;;
36 | 4)
37 | TARGET_DEVICE_ARGS="--target-device watch"
38 | ;;
39 | *)
40 | TARGET_DEVICE_ARGS="--target-device mac"
41 | ;;
42 | esac
43 |
44 | install_resource()
45 | {
46 | if [[ "$1" = /* ]] ; then
47 | RESOURCE_PATH="$1"
48 | else
49 | RESOURCE_PATH="${PODS_ROOT}/$1"
50 | fi
51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
52 | cat << EOM
53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
54 | EOM
55 | exit 1
56 | fi
57 | case $RESOURCE_PATH in
58 | *.storyboard)
59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
61 | ;;
62 | *.xib)
63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
65 | ;;
66 | *.framework)
67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
71 | ;;
72 | *.xcdatamodel)
73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
75 | ;;
76 | *.xcdatamodeld)
77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
79 | ;;
80 | *.xcmappingmodel)
81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
83 | ;;
84 | *.xcassets)
85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
87 | ;;
88 | *)
89 | echo "$RESOURCE_PATH" || true
90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
91 | ;;
92 | esac
93 | }
94 |
95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
100 | fi
101 | rm -f "$RESOURCES_TO_COPY"
102 |
103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
104 | then
105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
107 | while read line; do
108 | if [[ $line != "${PODS_ROOT}*" ]]; then
109 | XCASSET_FILES+=("$line")
110 | fi
111 | done <<<"$OTHER_XCASSETS"
112 |
113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
115 | else
116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
117 | fi
118 | fi
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_DecorateYourRoomVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_DecorateYourRoomVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_DecorateYourRoom {
2 | umbrella header "Pods-DecorateYourRoom-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-DecorateYourRoom/Pods-DecorateYourRoom.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## PlacenoteSDK
5 |
6 | Free Software License for Binary Distributions
7 | Perceptiv Labs Inc / San Francisco, California
8 |
9 | Revision 1, December 2017
10 |
11 | Definitions
12 | "Software" refers to the collection of files, including, but not
13 | limited to, source code, programs, binary executables, images, and
14 | scripts, which are distributed by Perceptiv Labs Inc.
15 |
16 | "Copyright Holder" is whoever is named in the copyright or copyrights
17 | for the Software.
18 |
19 | "You" is you, if you are thinking about using, copying or distributing
20 | this Software.
21 | _________________________________________________________________
22 |
23 | License Terms
24 |
25 | 1. You may use this Software for commercial or non-commercial
26 | purposes without charge if You accept this License.
27 | 2. You are not required to accept this License, since You have not
28 | signed it. However, nothing else grants You permission to use or
29 | distribute the Software or its derivative works. These actions are
30 | prohibited by law if You do not accept this License. Therefore, by
31 | using or distributing the Software (or any work based on the
32 | Software), You indicate your acceptance of this License to do so,
33 | and all its terms and conditions for copying, distributing or
34 | using the Software or works based on it.
35 | 3. You may not copy, modify, sublicense, or distribute the Software
36 | except as expressly provided under this License. Any attempt
37 | otherwise to copy, modify, sublicense or distribute the Software
38 | is void, and will automatically terminate your rights under this
39 | License.
40 | 4. You may make binary copies of this Software and individual parts
41 | of this Software for your own purpose without restriction.
42 | 5. If you wish to incorporate parts of the Software into other
43 | programs and/or if you wish to obtain the source code, write to
44 | the author.
45 | 6. You may distribute this Software as a whole, provided that:
46 | a. it includes all of the original Copyright Notices and
47 | associated Disclaimers and License documents;
48 | b. You leave the original Software distribution unmodified;
49 | c. and it includes all accompanying documentation.
50 | 7. You may charge a reasonable copying fee for any distribution of
51 | this Software. You may not charge a fee for this Software itself.
52 | However, You may distribute this Software in aggregate with other
53 | (possibly commercial) programs as part of a larger (possibly
54 | commercial) software distribution provided that You do not
55 | advertise this Software as a product of your own.
56 | 8. The name of the Copyright Holder may not be used to endorse or
57 | promote products derived from this software without specific prior
58 | written permission.
59 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
60 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
61 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
62 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
63 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
64 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
65 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
66 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
67 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
68 | OR CORRECTION.
69 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
70 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
71 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
72 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
73 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
74 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
75 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
76 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
77 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
78 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
79 | 11. This License is governed by the laws of California, USA,
80 | excluding choice of law rules. If any part of this License is
81 | found to be in conflict with the law, that part shall be
82 | interpreted in its broadest meaning consistent with the law, and
83 | no other parts of the License shall be affected.
84 | _________________________________________________________________
85 |
86 | Generated by CocoaPods - https://cocoapods.org
87 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Free Software License for Binary Distributions
18 | Perceptiv Labs Inc / San Francisco, California
19 |
20 | Revision 1, December 2017
21 |
22 | Definitions
23 | "Software" refers to the collection of files, including, but not
24 | limited to, source code, programs, binary executables, images, and
25 | scripts, which are distributed by Perceptiv Labs Inc.
26 |
27 | "Copyright Holder" is whoever is named in the copyright or copyrights
28 | for the Software.
29 |
30 | "You" is you, if you are thinking about using, copying or distributing
31 | this Software.
32 | _________________________________________________________________
33 |
34 | License Terms
35 |
36 | 1. You may use this Software for commercial or non-commercial
37 | purposes without charge if You accept this License.
38 | 2. You are not required to accept this License, since You have not
39 | signed it. However, nothing else grants You permission to use or
40 | distribute the Software or its derivative works. These actions are
41 | prohibited by law if You do not accept this License. Therefore, by
42 | using or distributing the Software (or any work based on the
43 | Software), You indicate your acceptance of this License to do so,
44 | and all its terms and conditions for copying, distributing or
45 | using the Software or works based on it.
46 | 3. You may not copy, modify, sublicense, or distribute the Software
47 | except as expressly provided under this License. Any attempt
48 | otherwise to copy, modify, sublicense or distribute the Software
49 | is void, and will automatically terminate your rights under this
50 | License.
51 | 4. You may make binary copies of this Software and individual parts
52 | of this Software for your own purpose without restriction.
53 | 5. If you wish to incorporate parts of the Software into other
54 | programs and/or if you wish to obtain the source code, write to
55 | the author.
56 | 6. You may distribute this Software as a whole, provided that:
57 | a. it includes all of the original Copyright Notices and
58 | associated Disclaimers and License documents;
59 | b. You leave the original Software distribution unmodified;
60 | c. and it includes all accompanying documentation.
61 | 7. You may charge a reasonable copying fee for any distribution of
62 | this Software. You may not charge a fee for this Software itself.
63 | However, You may distribute this Software in aggregate with other
64 | (possibly commercial) programs as part of a larger (possibly
65 | commercial) software distribution provided that You do not
66 | advertise this Software as a product of your own.
67 | 8. The name of the Copyright Holder may not be used to endorse or
68 | promote products derived from this software without specific prior
69 | written permission.
70 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
71 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
72 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
73 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
74 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
75 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
76 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
77 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
78 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
79 | OR CORRECTION.
80 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
81 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
82 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
83 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
84 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
85 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
86 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
87 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
88 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
89 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
90 | 11. This License is governed by the laws of California, USA,
91 | excluding choice of law rules. If any part of this License is
92 | found to be in conflict with the law, that part shall be
93 | interpreted in its broadest meaning consistent with the law, and
94 | no other parts of the License shall be affected.
95 | _________________________________________________________________
96 |
97 | License
98 | Placenote EULA
99 | Title
100 | PlacenoteSDK
101 | Type
102 | PSGroupSpecifier
103 |
104 |
105 | FooterText
106 | Generated by CocoaPods - https://cocoapods.org
107 | Title
108 |
109 | Type
110 | PSGroupSpecifier
111 |
112 |
113 | StringsTable
114 | Acknowledgements
115 | Title
116 | Acknowledgements
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_HelloWorld : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_HelloWorld
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # frameworks to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
19 |
20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
22 |
23 | # Used as a return value for each invocation of `strip_invalid_archs` function.
24 | STRIP_BINARY_RETVAL=0
25 |
26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
29 |
30 | # Copies and strips a vendored framework
31 | install_framework()
32 | {
33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
34 | local source="${BUILT_PRODUCTS_DIR}/$1"
35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
37 | elif [ -r "$1" ]; then
38 | local source="$1"
39 | fi
40 |
41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
42 |
43 | if [ -L "${source}" ]; then
44 | echo "Symlinked..."
45 | source="$(readlink "${source}")"
46 | fi
47 |
48 | # Use filter instead of exclude so missing patterns don't throw errors.
49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
51 |
52 | local basename
53 | basename="$(basename -s .framework "$1")"
54 | binary="${destination}/${basename}.framework/${basename}"
55 |
56 | if ! [ -r "$binary" ]; then
57 | binary="${destination}/${basename}"
58 | elif [ -L "${binary}" ]; then
59 | echo "Destination binary is symlinked..."
60 | dirname="$(dirname "${binary}")"
61 | binary="${dirname}/$(readlink "${binary}")"
62 | fi
63 |
64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
66 | strip_invalid_archs "$binary"
67 | fi
68 |
69 | # Resign the code if required by the build settings to avoid unstable apps
70 | code_sign_if_enabled "${destination}/$(basename "$1")"
71 |
72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
74 | local swift_runtime_libs
75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
76 | for lib in $swift_runtime_libs; do
77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
79 | code_sign_if_enabled "${destination}/${lib}"
80 | done
81 | fi
82 | }
83 |
84 | # Copies and strips a vendored dSYM
85 | install_dsym() {
86 | local source="$1"
87 | if [ -r "$source" ]; then
88 | # Copy the dSYM into a the targets temp dir.
89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
91 |
92 | local basename
93 | basename="$(basename -s .framework.dSYM "$source")"
94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
95 |
96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
98 | strip_invalid_archs "$binary"
99 | fi
100 |
101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
102 | # Move the stripped file into its final destination.
103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
105 | else
106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
108 | fi
109 | fi
110 | }
111 |
112 | # Copies the bcsymbolmap files of a vendored framework
113 | install_bcsymbolmap() {
114 | local bcsymbolmap_path="$1"
115 | local destination="${BUILT_PRODUCTS_DIR}"
116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
118 | }
119 |
120 | # Signs a framework with the provided identity
121 | code_sign_if_enabled() {
122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
123 | # Use the current code_sign_identity
124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
126 |
127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
128 | code_sign_cmd="$code_sign_cmd &"
129 | fi
130 | echo "$code_sign_cmd"
131 | eval "$code_sign_cmd"
132 | fi
133 | }
134 |
135 | # Strip invalid architectures
136 | strip_invalid_archs() {
137 | binary="$1"
138 | # Get architectures for current target binary
139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
140 | # Intersect them with the architectures we are building for
141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
142 | # If there are no archs supported by this binary then warn the user
143 | if [[ -z "$intersected_archs" ]]; then
144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
145 | STRIP_BINARY_RETVAL=0
146 | return
147 | fi
148 | stripped=""
149 | for arch in $binary_archs; do
150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
151 | # Strip non-valid architectures in-place
152 | lipo -remove "$arch" -output "$binary" "$binary"
153 | stripped="$stripped $arch"
154 | fi
155 | done
156 | if [[ "$stripped" ]]; then
157 | echo "Stripped $binary of architectures:$stripped"
158 | fi
159 | STRIP_BINARY_RETVAL=1
160 | }
161 |
162 |
163 | if [[ "$CONFIGURATION" == "Debug" ]]; then
164 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
165 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
166 | fi
167 | if [[ "$CONFIGURATION" == "Release" ]]; then
168 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
169 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
170 | fi
171 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
172 | wait
173 | fi
174 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # resources to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13 |
14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
15 | > "$RESOURCES_TO_COPY"
16 |
17 | XCASSET_FILES=()
18 |
19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
22 |
23 | case "${TARGETED_DEVICE_FAMILY:-}" in
24 | 1,2)
25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
26 | ;;
27 | 1)
28 | TARGET_DEVICE_ARGS="--target-device iphone"
29 | ;;
30 | 2)
31 | TARGET_DEVICE_ARGS="--target-device ipad"
32 | ;;
33 | 3)
34 | TARGET_DEVICE_ARGS="--target-device tv"
35 | ;;
36 | 4)
37 | TARGET_DEVICE_ARGS="--target-device watch"
38 | ;;
39 | *)
40 | TARGET_DEVICE_ARGS="--target-device mac"
41 | ;;
42 | esac
43 |
44 | install_resource()
45 | {
46 | if [[ "$1" = /* ]] ; then
47 | RESOURCE_PATH="$1"
48 | else
49 | RESOURCE_PATH="${PODS_ROOT}/$1"
50 | fi
51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
52 | cat << EOM
53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
54 | EOM
55 | exit 1
56 | fi
57 | case $RESOURCE_PATH in
58 | *.storyboard)
59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
61 | ;;
62 | *.xib)
63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
65 | ;;
66 | *.framework)
67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
71 | ;;
72 | *.xcdatamodel)
73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
75 | ;;
76 | *.xcdatamodeld)
77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
79 | ;;
80 | *.xcmappingmodel)
81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
83 | ;;
84 | *.xcassets)
85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
87 | ;;
88 | *)
89 | echo "$RESOURCE_PATH" || true
90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
91 | ;;
92 | esac
93 | }
94 |
95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
100 | fi
101 | rm -f "$RESOURCES_TO_COPY"
102 |
103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
104 | then
105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
107 | while read line; do
108 | if [[ $line != "${PODS_ROOT}*" ]]; then
109 | XCASSET_FILES+=("$line")
110 | fi
111 | done <<<"$OTHER_XCASSETS"
112 |
113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
115 | else
116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
117 | fi
118 | fi
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_HelloWorldVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_HelloWorldVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_HelloWorld {
2 | umbrella header "Pods-HelloWorld-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## PlacenoteSDK
5 |
6 | Free Software License for Binary Distributions
7 | Perceptiv Labs Inc / San Francisco, California
8 |
9 | Revision 1, December 2017
10 |
11 | Definitions
12 | "Software" refers to the collection of files, including, but not
13 | limited to, source code, programs, binary executables, images, and
14 | scripts, which are distributed by Perceptiv Labs Inc.
15 |
16 | "Copyright Holder" is whoever is named in the copyright or copyrights
17 | for the Software.
18 |
19 | "You" is you, if you are thinking about using, copying or distributing
20 | this Software.
21 | _________________________________________________________________
22 |
23 | License Terms
24 |
25 | 1. You may use this Software for commercial or non-commercial
26 | purposes without charge if You accept this License.
27 | 2. You are not required to accept this License, since You have not
28 | signed it. However, nothing else grants You permission to use or
29 | distribute the Software or its derivative works. These actions are
30 | prohibited by law if You do not accept this License. Therefore, by
31 | using or distributing the Software (or any work based on the
32 | Software), You indicate your acceptance of this License to do so,
33 | and all its terms and conditions for copying, distributing or
34 | using the Software or works based on it.
35 | 3. You may not copy, modify, sublicense, or distribute the Software
36 | except as expressly provided under this License. Any attempt
37 | otherwise to copy, modify, sublicense or distribute the Software
38 | is void, and will automatically terminate your rights under this
39 | License.
40 | 4. You may make binary copies of this Software and individual parts
41 | of this Software for your own purpose without restriction.
42 | 5. If you wish to incorporate parts of the Software into other
43 | programs and/or if you wish to obtain the source code, write to
44 | the author.
45 | 6. You may distribute this Software as a whole, provided that:
46 | a. it includes all of the original Copyright Notices and
47 | associated Disclaimers and License documents;
48 | b. You leave the original Software distribution unmodified;
49 | c. and it includes all accompanying documentation.
50 | 7. You may charge a reasonable copying fee for any distribution of
51 | this Software. You may not charge a fee for this Software itself.
52 | However, You may distribute this Software in aggregate with other
53 | (possibly commercial) programs as part of a larger (possibly
54 | commercial) software distribution provided that You do not
55 | advertise this Software as a product of your own.
56 | 8. The name of the Copyright Holder may not be used to endorse or
57 | promote products derived from this software without specific prior
58 | written permission.
59 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
60 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
61 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
62 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
63 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
64 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
65 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
66 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
67 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
68 | OR CORRECTION.
69 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
70 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
71 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
72 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
73 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
74 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
75 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
76 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
77 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
78 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
79 | 11. This License is governed by the laws of California, USA,
80 | excluding choice of law rules. If any part of this License is
81 | found to be in conflict with the law, that part shall be
82 | interpreted in its broadest meaning consistent with the law, and
83 | no other parts of the License shall be affected.
84 | _________________________________________________________________
85 |
86 | Generated by CocoaPods - https://cocoapods.org
87 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Free Software License for Binary Distributions
18 | Perceptiv Labs Inc / San Francisco, California
19 |
20 | Revision 1, December 2017
21 |
22 | Definitions
23 | "Software" refers to the collection of files, including, but not
24 | limited to, source code, programs, binary executables, images, and
25 | scripts, which are distributed by Perceptiv Labs Inc.
26 |
27 | "Copyright Holder" is whoever is named in the copyright or copyrights
28 | for the Software.
29 |
30 | "You" is you, if you are thinking about using, copying or distributing
31 | this Software.
32 | _________________________________________________________________
33 |
34 | License Terms
35 |
36 | 1. You may use this Software for commercial or non-commercial
37 | purposes without charge if You accept this License.
38 | 2. You are not required to accept this License, since You have not
39 | signed it. However, nothing else grants You permission to use or
40 | distribute the Software or its derivative works. These actions are
41 | prohibited by law if You do not accept this License. Therefore, by
42 | using or distributing the Software (or any work based on the
43 | Software), You indicate your acceptance of this License to do so,
44 | and all its terms and conditions for copying, distributing or
45 | using the Software or works based on it.
46 | 3. You may not copy, modify, sublicense, or distribute the Software
47 | except as expressly provided under this License. Any attempt
48 | otherwise to copy, modify, sublicense or distribute the Software
49 | is void, and will automatically terminate your rights under this
50 | License.
51 | 4. You may make binary copies of this Software and individual parts
52 | of this Software for your own purpose without restriction.
53 | 5. If you wish to incorporate parts of the Software into other
54 | programs and/or if you wish to obtain the source code, write to
55 | the author.
56 | 6. You may distribute this Software as a whole, provided that:
57 | a. it includes all of the original Copyright Notices and
58 | associated Disclaimers and License documents;
59 | b. You leave the original Software distribution unmodified;
60 | c. and it includes all accompanying documentation.
61 | 7. You may charge a reasonable copying fee for any distribution of
62 | this Software. You may not charge a fee for this Software itself.
63 | However, You may distribute this Software in aggregate with other
64 | (possibly commercial) programs as part of a larger (possibly
65 | commercial) software distribution provided that You do not
66 | advertise this Software as a product of your own.
67 | 8. The name of the Copyright Holder may not be used to endorse or
68 | promote products derived from this software without specific prior
69 | written permission.
70 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
71 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
72 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
73 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
74 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
75 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
76 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
77 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
78 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
79 | OR CORRECTION.
80 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
81 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
82 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
83 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
84 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
85 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
86 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
87 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
88 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
89 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
90 | 11. This License is governed by the laws of California, USA,
91 | excluding choice of law rules. If any part of this License is
92 | found to be in conflict with the law, that part shall be
93 | interpreted in its broadest meaning consistent with the law, and
94 | no other parts of the License shall be affected.
95 | _________________________________________________________________
96 |
97 | License
98 | Placenote EULA
99 | Title
100 | PlacenoteSDK
101 | Type
102 | PSGroupSpecifier
103 |
104 |
105 | FooterText
106 | Generated by CocoaPods - https://cocoapods.org
107 | Title
108 |
109 | Type
110 | PSGroupSpecifier
111 |
112 |
113 | StringsTable
114 | Acknowledgements
115 | Title
116 | Acknowledgements
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_RandomShapes : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_RandomShapes
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks.sh
2 | ${PODS_ROOT}/PlacenoteSDK/Placenote.framework
3 | ${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Placenote.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PlacenoteSDK.framework
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # frameworks to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
19 |
20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
22 |
23 | # Used as a return value for each invocation of `strip_invalid_archs` function.
24 | STRIP_BINARY_RETVAL=0
25 |
26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
29 |
30 | # Copies and strips a vendored framework
31 | install_framework()
32 | {
33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
34 | local source="${BUILT_PRODUCTS_DIR}/$1"
35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
37 | elif [ -r "$1" ]; then
38 | local source="$1"
39 | fi
40 |
41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
42 |
43 | if [ -L "${source}" ]; then
44 | echo "Symlinked..."
45 | source="$(readlink "${source}")"
46 | fi
47 |
48 | # Use filter instead of exclude so missing patterns don't throw errors.
49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
51 |
52 | local basename
53 | basename="$(basename -s .framework "$1")"
54 | binary="${destination}/${basename}.framework/${basename}"
55 |
56 | if ! [ -r "$binary" ]; then
57 | binary="${destination}/${basename}"
58 | elif [ -L "${binary}" ]; then
59 | echo "Destination binary is symlinked..."
60 | dirname="$(dirname "${binary}")"
61 | binary="${dirname}/$(readlink "${binary}")"
62 | fi
63 |
64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
66 | strip_invalid_archs "$binary"
67 | fi
68 |
69 | # Resign the code if required by the build settings to avoid unstable apps
70 | code_sign_if_enabled "${destination}/$(basename "$1")"
71 |
72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
74 | local swift_runtime_libs
75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
76 | for lib in $swift_runtime_libs; do
77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
79 | code_sign_if_enabled "${destination}/${lib}"
80 | done
81 | fi
82 | }
83 |
84 | # Copies and strips a vendored dSYM
85 | install_dsym() {
86 | local source="$1"
87 | if [ -r "$source" ]; then
88 | # Copy the dSYM into a the targets temp dir.
89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
91 |
92 | local basename
93 | basename="$(basename -s .framework.dSYM "$source")"
94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
95 |
96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
98 | strip_invalid_archs "$binary"
99 | fi
100 |
101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
102 | # Move the stripped file into its final destination.
103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
105 | else
106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
108 | fi
109 | fi
110 | }
111 |
112 | # Copies the bcsymbolmap files of a vendored framework
113 | install_bcsymbolmap() {
114 | local bcsymbolmap_path="$1"
115 | local destination="${BUILT_PRODUCTS_DIR}"
116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
118 | }
119 |
120 | # Signs a framework with the provided identity
121 | code_sign_if_enabled() {
122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
123 | # Use the current code_sign_identity
124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
126 |
127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
128 | code_sign_cmd="$code_sign_cmd &"
129 | fi
130 | echo "$code_sign_cmd"
131 | eval "$code_sign_cmd"
132 | fi
133 | }
134 |
135 | # Strip invalid architectures
136 | strip_invalid_archs() {
137 | binary="$1"
138 | # Get architectures for current target binary
139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
140 | # Intersect them with the architectures we are building for
141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
142 | # If there are no archs supported by this binary then warn the user
143 | if [[ -z "$intersected_archs" ]]; then
144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
145 | STRIP_BINARY_RETVAL=0
146 | return
147 | fi
148 | stripped=""
149 | for arch in $binary_archs; do
150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
151 | # Strip non-valid architectures in-place
152 | lipo -remove "$arch" -output "$binary" "$binary"
153 | stripped="$stripped $arch"
154 | fi
155 | done
156 | if [[ "$stripped" ]]; then
157 | echo "Stripped $binary of architectures:$stripped"
158 | fi
159 | STRIP_BINARY_RETVAL=1
160 | }
161 |
162 |
163 | if [[ "$CONFIGURATION" == "Debug" ]]; then
164 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
165 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
166 | fi
167 | if [[ "$CONFIGURATION" == "Release" ]]; then
168 | install_framework "${PODS_ROOT}/PlacenoteSDK/Placenote.framework"
169 | install_framework "${BUILT_PRODUCTS_DIR}/PlacenoteSDK/PlacenoteSDK.framework"
170 | fi
171 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
172 | wait
173 | fi
174 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # resources to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13 |
14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
15 | > "$RESOURCES_TO_COPY"
16 |
17 | XCASSET_FILES=()
18 |
19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
22 |
23 | case "${TARGETED_DEVICE_FAMILY:-}" in
24 | 1,2)
25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
26 | ;;
27 | 1)
28 | TARGET_DEVICE_ARGS="--target-device iphone"
29 | ;;
30 | 2)
31 | TARGET_DEVICE_ARGS="--target-device ipad"
32 | ;;
33 | 3)
34 | TARGET_DEVICE_ARGS="--target-device tv"
35 | ;;
36 | 4)
37 | TARGET_DEVICE_ARGS="--target-device watch"
38 | ;;
39 | *)
40 | TARGET_DEVICE_ARGS="--target-device mac"
41 | ;;
42 | esac
43 |
44 | install_resource()
45 | {
46 | if [[ "$1" = /* ]] ; then
47 | RESOURCE_PATH="$1"
48 | else
49 | RESOURCE_PATH="${PODS_ROOT}/$1"
50 | fi
51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
52 | cat << EOM
53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
54 | EOM
55 | exit 1
56 | fi
57 | case $RESOURCE_PATH in
58 | *.storyboard)
59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
61 | ;;
62 | *.xib)
63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
65 | ;;
66 | *.framework)
67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
71 | ;;
72 | *.xcdatamodel)
73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
75 | ;;
76 | *.xcdatamodeld)
77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
79 | ;;
80 | *.xcmappingmodel)
81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
83 | ;;
84 | *.xcassets)
85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
87 | ;;
88 | *)
89 | echo "$RESOURCE_PATH" || true
90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
91 | ;;
92 | esac
93 | }
94 |
95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
100 | fi
101 | rm -f "$RESOURCES_TO_COPY"
102 |
103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
104 | then
105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
107 | while read line; do
108 | if [[ $line != "${PODS_ROOT}*" ]]; then
109 | XCASSET_FILES+=("$line")
110 | fi
111 | done <<<"$OTHER_XCASSETS"
112 |
113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
115 | else
116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
117 | fi
118 | fi
119 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_RandomShapesVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_RandomShapesVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_RandomShapes {
2 | umbrella header "Pods-RandomShapes-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-RandomShapes/Pods-RandomShapes.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK" "${PODS_ROOT}/PlacenoteSDK"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PlacenoteSDK/PlacenoteSDK.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Placenote" -framework "PlacenoteSDK"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
11 | PODS_ROOT = ${SRCROOT}/../Pods
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Placenote SDK for iOS
2 |
3 | Placenote SDK lets you easily build cloud-based Augmented Reality (AR) apps that pin digital content to locations in the real world. The SDK is compatible with all ARKit enabled phones and can be used to create persistent augmented reality experiences using Swift and SceneKit.
4 |
5 | The SDK includes 3 sample Xcode projects that you can use as starting points for your projects.
6 |
7 | - - -
8 |
9 | ## Using this Github repository
10 |
11 | * If you want to download this sample project, please **DO NOT download the source as a zip file**, because you will not get all the neccessary library files if you do so. Please follow the [download instructions in the documentation](https://docs.placenote.com).
12 |
13 | ## Resources
14 |
15 | * [Get Started Guide & Documentation](https://docs.placenote.com)
16 | * [Placenote Website](https://placenote.com)
17 | * [Slack Community](https://placenote.com/slack)
18 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes.xcodeproj/xcshareddata/xcschemes/RandomShapes.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Shape Dropper (Placenote SDK iOS Sample)
4 | //
5 | // Created by Neil Mathew on 10/10/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PlacenoteSDK
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 |
19 | LibPlacenote.instance.initialize(apiKey: Enter API Key Here, onInitialized: {(initialized: Bool?) -> Void in
20 | if (initialized!) {
21 | print ("SDK Initialized")
22 | }
23 | else {
24 | print ("SDK Could not be initialized")
25 | }
26 | })
27 | return true
28 | }
29 |
30 | func applicationWillResignActive(_ application: UIApplication) {
31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
32 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
33 | }
34 |
35 | func applicationDidEnterBackground(_ application: UIApplication) {
36 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
38 | }
39 |
40 | func applicationWillEnterForeground(_ application: UIApplication) {
41 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
42 | }
43 |
44 | func applicationDidBecomeActive(_ application: UIApplication) {
45 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
46 | }
47 |
48 | func applicationWillTerminate(_ application: UIApplication) {
49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
50 | LibPlacenote.instance.shutdown()
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | RandomShapes
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.8
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSCameraUsageDescription
26 | This application will use the camera for Augmented Reality.
27 | NSLocationWhenInUseUsageDescription
28 | Geolocation for Places
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIMainStoryboardFile
32 | Main
33 | UIRequiredDeviceCapabilities
34 |
35 | armv7
36 |
37 | UIStatusBarHidden
38 |
39 | UISupportedInterfaceOrientations
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationLandscapeLeft
43 | UIInterfaceOrientationLandscapeRight
44 |
45 | UISupportedInterfaceOrientations~ipad
46 |
47 | UIInterfaceOrientationPortrait
48 | UIInterfaceOrientationPortraitUpsideDown
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/ShapeManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShapeManager.swift
3 | // Shape Dropper (Placenote SDK iOS Sample)
4 | //
5 | // Created by Neil Mathew on 10/10/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SceneKit
11 |
12 | extension String {
13 | func appendLineToURL(fileURL: URL) throws {
14 | try (self + "\n").appendToURL(fileURL: fileURL)
15 | }
16 |
17 | func appendToURL(fileURL: URL) throws {
18 | let data = self.data(using: String.Encoding.utf8)!
19 | try data.append(fileURL: fileURL)
20 | }
21 | }
22 |
23 |
24 | extension Data {
25 | func append(fileURL: URL) throws {
26 | if let fileHandle = FileHandle(forWritingAtPath: fileURL.path) {
27 | defer {
28 | fileHandle.closeFile()
29 | }
30 | fileHandle.seekToEndOfFile()
31 | fileHandle.write(self)
32 | }
33 | else {
34 | try write(to: fileURL, options: .atomic)
35 | }
36 | }
37 | }
38 |
39 | func generateRandomColor() -> UIColor {
40 | let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0
41 | let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.3 // from 0.3 to 1.0 to stay away from white
42 | let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.3 // from 0.3 to 1.0 to stay away from black
43 |
44 | return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1)
45 | }
46 |
47 |
48 | //Class to manage a list of shapes to be view in Augmented Reality including spawning, managing a list and saving/retrieving from persistent memory using JSON
49 | class ShapeManager {
50 |
51 | private var scnScene: SCNScene!
52 | private var scnView: SCNView!
53 |
54 | private var shapePositions: [SCNVector3] = []
55 | private var shapeTypes: [ShapeType] = []
56 | private var shapeNodes: [SCNNode] = []
57 |
58 | public var shapesDrawn: Bool! = false
59 |
60 |
61 | init(view: SCNView) {
62 | scnScene = view.scene
63 | scnView = view
64 | }
65 |
66 | func getShapeArray() -> [[String: [String: String]]] {
67 | var shapeArray: [[String: [String: String]]] = []
68 | if (shapePositions.count > 0) {
69 | for i in 0...(shapePositions.count-1) {
70 | shapeArray.append(["shape": ["style": "\(shapeTypes[i].rawValue)", "x": "\(shapePositions[i].x)", "y": "\(shapePositions[i].y)", "z": "\(shapePositions[i].z)" ]])
71 | }
72 | }
73 | return shapeArray
74 | }
75 |
76 | // Load shape array
77 | func loadShapeArray(shapeArray: [[String: [String: String]]]?) -> Bool {
78 | clearShapes() //clear currently viewing shapes and delete any record of them.
79 |
80 | if (shapeArray == nil) {
81 | print ("Shape Manager: No shapes for this map")
82 | return false
83 | }
84 |
85 | for item in shapeArray! {
86 | let x_string: String = item["shape"]!["x"]!
87 | let y_string: String = item["shape"]!["y"]!
88 | let z_string: String = item["shape"]!["z"]!
89 | let position: SCNVector3 = SCNVector3(x: Float(x_string)!, y: Float(y_string)!, z: Float(z_string)!)
90 | let type: ShapeType = ShapeType(rawValue: Int(item["shape"]!["style"]!)!)!
91 | shapePositions.append(position)
92 | shapeTypes.append(type)
93 | shapeNodes.append(createShape(position: position, type: type))
94 |
95 | print ("Shape Manager: Retrieved " + String(describing: type) + " type at position" + String (describing: position))
96 | }
97 |
98 | print ("Shape Manager: retrieved " + String(shapePositions.count) + " shapes")
99 | return true
100 | }
101 |
102 | func clearView() { //clear shapes from view
103 | for shape in shapeNodes {
104 | shape.removeFromParentNode()
105 | }
106 | shapesDrawn = false
107 | }
108 |
109 | func drawView(parent: SCNNode) {
110 | guard !shapesDrawn else {return}
111 | for shape in shapeNodes {
112 | parent.addChildNode(shape)
113 | }
114 | shapesDrawn = true
115 | }
116 |
117 | func clearShapes() { //delete all nodes and record of all shapes
118 | clearView()
119 | for node in shapeNodes {
120 | node.geometry!.firstMaterial!.normal.contents = nil
121 | node.geometry!.firstMaterial!.diffuse.contents = nil
122 | }
123 | shapeNodes.removeAll()
124 | shapePositions.removeAll()
125 | shapeTypes.removeAll()
126 | }
127 |
128 |
129 |
130 | func spawnRandomShape(position: SCNVector3) {
131 |
132 | let shapeType: ShapeType = ShapeType.random()
133 | placeShape(position: position, type: shapeType)
134 | }
135 |
136 | func placeShape (position: SCNVector3, type: ShapeType) {
137 |
138 | let geometryNode: SCNNode = createShape(position: position, type: type)
139 |
140 | shapePositions.append(position)
141 | shapeTypes.append(type)
142 | shapeNodes.append(geometryNode)
143 |
144 | scnScene.rootNode.addChildNode(geometryNode)
145 | shapesDrawn = true
146 | }
147 |
148 | func createShape (position: SCNVector3, type: ShapeType) -> SCNNode {
149 |
150 | let geometry:SCNGeometry = ShapeType.generateGeometry(s_type: type)
151 | let color = UIColor.cyan
152 | geometry.materials.first?.diffuse.contents = color
153 |
154 | let geometryNode = SCNNode(geometry: geometry)
155 | geometryNode.position = position
156 | geometryNode.scale = SCNVector3(x:0.1, y:0.1, z:0.1)
157 |
158 | return geometryNode
159 | }
160 |
161 |
162 | }
163 |
--------------------------------------------------------------------------------
/RandomShapes/RandomShapes/ShapeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShapeType.swift
3 | // Shape Dropper (Placenote SDK iOS Sample)
4 | //
5 | // Created by Neil Mathew on 10/10/19.
6 | // Copyright © 2019 Placenote. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SceneKit
11 |
12 | public enum ShapeType:Int {
13 |
14 | case Box = 0
15 | case Sphere
16 | case Pyramid
17 | case Torus
18 | case Capsule
19 | case Cylinder
20 | case Cone
21 | case Tube
22 |
23 | static func random() -> ShapeType {
24 | let maxValue = Tube.rawValue
25 | let rand = arc4random_uniform(UInt32(maxValue+1))
26 | return ShapeType(rawValue: Int(rand))!
27 | }
28 |
29 |
30 | static func generateGeometry(s_type:ShapeType) -> SCNGeometry {
31 |
32 | let geometry: SCNGeometry
33 |
34 | switch s_type {
35 | case ShapeType.Sphere: //
36 | geometry = SCNSphere(radius: 1.0)
37 | case ShapeType.Capsule:
38 | geometry = SCNCapsule(capRadius:0.5, height:1.0)
39 | case ShapeType.Cone:
40 | geometry = SCNCone(topRadius:0, bottomRadius:0.5, height:1.0)
41 | case ShapeType.Cylinder:
42 | geometry = SCNCylinder(radius:0.5, height:1.0)
43 | case ShapeType.Pyramid:
44 | geometry = SCNPyramid(width:1.0, height:1.0, length:1.0)
45 | case ShapeType.Torus:
46 | geometry = SCNTorus(ringRadius:1.0, pipeRadius:0.1)
47 | case ShapeType.Box: //
48 | fallthrough
49 | default:
50 | geometry = SCNBox(width: 1.0, height: 1.0, length: 1.0, chamferRadius: 0.1)
51 | }
52 |
53 | return geometry
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/license/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2017 Perceptiv Labs Inc.
2 |
3 | Uncless specified otherwise in the list below, this software is
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Placenote.framework is under a proprietary license with details to be found in the file
17 | License.libPlacenote
18 | Placenote.framework uses some third party libraries, their respective licenses are listed below
19 | libOpencv is covered under BSD3 with details in License.OpenCV
20 | gtsam is covered under the BSD license with details in License.gtsam
21 | curly is covered under the MIT license with details in License.curly
22 | g2o is covered under the BSD license with details in License.g2o
23 | DBoW2 is covered under the BSD license with details in License.dbow2
24 |
25 |
--------------------------------------------------------------------------------
/license/License.DBoW2:
--------------------------------------------------------------------------------
1 | DBoW2: bag-of-words library for C++ with generic descriptors
2 |
3 | Copyright (c) 2015 Dorian Galvez-Lopez. http://doriangalvez.com
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions
8 | are met:
9 | 1. Redistributions of source code must retain the above copyright
10 | notice, this list of conditions and the following disclaimer.
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 | 3. The original author of the work must be notified of any
15 | redistribution of source code or in binary form.
16 | 4. Neither the name of copyright holders nor the names of its
17 | contributors may be used to endorse or promote products derived
18 | from this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
24 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | POSSIBILITY OF SUCH DAMAGE.
31 |
32 | If you use it in an academic work, please cite:
33 |
34 | @ARTICLE{GalvezTRO12,
35 | author={G\'alvez-L\'opez, Dorian and Tard\'os, J. D.},
36 | journal={IEEE Transactions on Robotics},
37 | title={Bags of Binary Words for Fast Place Recognition in Image Sequences},
38 | year={2012},
39 | month={October},
40 | volume={28},
41 | number={5},
42 | pages={1188--1197},
43 | doi={10.1109/TRO.2012.2197158},
44 | ISSN={1552-3098}
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/license/License.OpenCV:
--------------------------------------------------------------------------------
1 | By downloading, copying, installing or using the software you agree to this license.
2 | If you do not agree to this license, do not download, install,
3 | copy or use the software.
4 |
5 |
6 | License Agreement
7 | For Open Source Computer Vision Library
8 | (3-clause BSD License)
9 |
10 | Copyright (C) 2000-2016, Intel Corporation, all rights reserved.
11 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
12 | Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
13 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.
15 | Copyright (C) 2015-2016, Itseez Inc., all rights reserved.
16 | Third party copyrights are property of their respective owners.
17 |
18 | Redistribution and use in source and binary forms, with or without modification,
19 | are permitted provided that the following conditions are met:
20 |
21 | * Redistributions of source code must retain the above copyright notice,
22 | this list of conditions and the following disclaimer.
23 |
24 | * Redistributions in binary form must reproduce the above copyright notice,
25 | this list of conditions and the following disclaimer in the documentation
26 | and/or other materials provided with the distribution.
27 |
28 | * Neither the names of the copyright holders nor the names of the contributors
29 | may be used to endorse or promote products derived from this software
30 | without specific prior written permission.
31 |
32 | This software is provided by the copyright holders and contributors "as is" and
33 | any express or implied warranties, including, but not limited to, the implied
34 | warranties of merchantability and fitness for a particular purpose are disclaimed.
35 | In no event shall copyright holders or contributors be liable for any direct,
36 | indirect, incidental, special, exemplary, or consequential damages
37 | (including, but not limited to, procurement of substitute goods or services;
38 | loss of use, data, or profits; or business interruption) however caused
39 | and on any theory of liability, whether in contract, strict liability,
40 | or tort (including negligence or otherwise) arising in any way out of
41 | the use of this software, even if advised of the possibility of such damage.
42 |
--------------------------------------------------------------------------------
/license/License.curly:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 johanlantz
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/license/License.g2o:
--------------------------------------------------------------------------------
1 | g2o - General Graph Optimization
2 | Copyright (C) 2011 Rainer Kuemmerle, Giorgio Grisetti, Hauke Strasdat,
3 | Kurt Konolige, and Wolfram Burgard
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are
8 | met:
9 |
10 | * Redistributions of source code must retain the above copyright notice,
11 | this list of conditions and the following disclaimer.
12 | * Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in the
14 | documentation and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
17 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
19 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
--------------------------------------------------------------------------------
/license/License.gtsam:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010, Georgia Tech Research Corporation
2 | Atlanta, Georgia 30332-0415
3 | All Rights Reserved
4 |
5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8 |
9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10 |
11 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12 |
13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 |
15 |
--------------------------------------------------------------------------------
/license/License.libPlacenote:
--------------------------------------------------------------------------------
1 | Free Software License for Binary Distributions
2 | Perceptiv Labs Inc / San Francisco, California
3 |
4 | Revision 1, December 2017
5 |
6 | Definitions
7 | "Software" refers to the collection of files, including, but not
8 | limited to, source code, programs, binary executables, images, and
9 | scripts, which are distributed by Perceptiv Labs Inc.
10 |
11 | "Copyright Holder" is whoever is named in the copyright or copyrights
12 | for the Software.
13 |
14 | "You" is you, if you are thinking about using, copying or distributing
15 | this Software.
16 | _________________________________________________________________
17 |
18 | License Terms
19 |
20 | 1. You may use this Software for commercial or non-commercial
21 | purposes without charge if You accept this License.
22 | 2. You are not required to accept this License, since You have not
23 | signed it. However, nothing else grants You permission to use or
24 | distribute the Software or its derivative works. These actions are
25 | prohibited by law if You do not accept this License. Therefore, by
26 | using or distributing the Software (or any work based on the
27 | Software), You indicate your acceptance of this License to do so,
28 | and all its terms and conditions for copying, distributing or
29 | using the Software or works based on it.
30 | 3. You may not copy, modify, sublicense, or distribute the Software
31 | except as expressly provided under this License. Any attempt
32 | otherwise to copy, modify, sublicense or distribute the Software
33 | is void, and will automatically terminate your rights under this
34 | License.
35 | 4. You may make binary copies of this Software and individual parts
36 | of this Software for your own purpose without restriction.
37 | 5. If you wish to incorporate parts of the Software into other
38 | programs and/or if you wish to obtain the source code, write to
39 | the author.
40 | 6. You may distribute this Software as a whole, provided that:
41 | a. it includes all of the original Copyright Notices and
42 | associated Disclaimers and License documents;
43 | b. You leave the original Software distribution unmodified;
44 | c. and it includes all accompanying documentation.
45 | 7. You may charge a reasonable copying fee for any distribution of
46 | this Software. You may not charge a fee for this Software itself.
47 | However, You may distribute this Software in aggregate with other
48 | (possibly commercial) programs as part of a larger (possibly
49 | commercial) software distribution provided that You do not
50 | advertise this Software as a product of your own.
51 | 8. The name of the Copyright Holder may not be used to endorse or
52 | promote products derived from this software without specific prior
53 | written permission.
54 | 9. BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO
55 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
56 | LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
57 | AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY
58 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
59 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
60 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
61 | PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
62 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
63 | OR CORRECTION.
64 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
65 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
66 | MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE
67 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
68 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
69 | INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS
70 | OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
71 | YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH
72 | ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
73 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
74 | 11. This License is governed by the laws of California, USA,
75 | excluding choice of law rules. If any part of this License is
76 | found to be in conflict with the law, that part shall be
77 | interpreted in its broadest meaning consistent with the law, and
78 | no other parts of the License shall be affected.
79 | _________________________________________________________________
80 |
--------------------------------------------------------------------------------