Skip to content

Commit ffbd247

Browse files
committed
first push
1 parent cf16c94 commit ffbd247

File tree

82 files changed

+42980
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+42980
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
.DS_Store

GeeksNearby-mobile/ios/GeeksNearby.xcodeproj/project.pbxproj

Lines changed: 551 additions & 0 deletions
Large diffs are not rendered by default.

GeeksNearby-mobile/ios/GeeksNearby.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
version = "1.3">
4+
<BuildAction
5+
parallelizeBuildables = "YES"
6+
buildImplicitDependencies = "YES">
7+
<BuildActionEntries>
8+
<BuildActionEntry
9+
buildForTesting = "YES"
10+
buildForRunning = "YES"
11+
buildForProfiling = "YES"
12+
buildForArchiving = "YES"
13+
buildForAnalyzing = "YES">
14+
<BuildableReference
15+
BuildableIdentifier = "primary"
16+
BlueprintIdentifier = "CCD71D2615B459FB0036936F"
17+
BuildableName = "GeeksNearby.app"
18+
BlueprintName = "GeeksNearby"
19+
ReferencedContainer = "container:GeeksNearby.xcodeproj">
20+
</BuildableReference>
21+
</BuildActionEntry>
22+
</BuildActionEntries>
23+
</BuildAction>
24+
<TestAction
25+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
26+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
27+
shouldUseLaunchSchemeArgsEnv = "YES"
28+
buildConfiguration = "Debug">
29+
<Testables>
30+
</Testables>
31+
<MacroExpansion>
32+
<BuildableReference
33+
BuildableIdentifier = "primary"
34+
BlueprintIdentifier = "CCD71D2615B459FB0036936F"
35+
BuildableName = "GeeksNearby.app"
36+
BlueprintName = "GeeksNearby"
37+
ReferencedContainer = "container:GeeksNearby.xcodeproj">
38+
</BuildableReference>
39+
</MacroExpansion>
40+
</TestAction>
41+
<LaunchAction
42+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
43+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
44+
launchStyle = "0"
45+
useCustomWorkingDirectory = "NO"
46+
buildConfiguration = "Debug"
47+
ignoresPersistentStateOnLaunch = "NO"
48+
debugDocumentVersioning = "YES"
49+
allowLocationSimulation = "YES">
50+
<BuildableProductRunnable>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "CCD71D2615B459FB0036936F"
54+
BuildableName = "GeeksNearby.app"
55+
BlueprintName = "GeeksNearby"
56+
ReferencedContainer = "container:GeeksNearby.xcodeproj">
57+
</BuildableReference>
58+
</BuildableProductRunnable>
59+
<AdditionalOptions>
60+
</AdditionalOptions>
61+
</LaunchAction>
62+
<ProfileAction
63+
shouldUseLaunchSchemeArgsEnv = "YES"
64+
savedToolIdentifier = ""
65+
useCustomWorkingDirectory = "NO"
66+
buildConfiguration = "Release"
67+
debugDocumentVersioning = "YES">
68+
<BuildableProductRunnable>
69+
<BuildableReference
70+
BuildableIdentifier = "primary"
71+
BlueprintIdentifier = "CCD71D2615B459FB0036936F"
72+
BuildableName = "GeeksNearby.app"
73+
BlueprintName = "GeeksNearby"
74+
ReferencedContainer = "container:GeeksNearby.xcodeproj">
75+
</BuildableReference>
76+
</BuildableProductRunnable>
77+
</ProfileAction>
78+
<AnalyzeAction
79+
buildConfiguration = "Debug">
80+
</AnalyzeAction>
81+
<ArchiveAction
82+
buildConfiguration = "Release"
83+
revealArchiveInOrganizer = "YES">
84+
</ArchiveAction>
85+
</Scheme>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>GeeksNearby.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>CCD71D2615B459FB0036936F</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
</dict>
21+
</dict>
22+
</plist>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
//
21+
// AppDelegate.h
22+
// GeeksNearby
23+
//
24+
// Created by Piotr Walczyszyn on 7/16/12.
25+
// Copyright pwalczys@adobe.com 2012. All rights reserved.
26+
//
27+
28+
#import <UIKit/UIKit.h>
29+
30+
#ifdef CORDOVA_FRAMEWORK
31+
#import <Cordova/CDVViewController.h>
32+
#else
33+
#import "CDVViewController.h"
34+
#endif
35+
36+
37+
@interface AppDelegate : NSObject < UIApplicationDelegate > {
38+
39+
}
40+
41+
// invoke string is passed to your app on launch, this is only valid if you
42+
// edit GeeksNearby-Info.plist to add a protocol
43+
// a simple tutorial can be found here :
44+
// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
45+
46+
@property (nonatomic, retain) IBOutlet UIWindow* window;
47+
@property (nonatomic, retain) IBOutlet CDVViewController* viewController;
48+
49+
@end
50+
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
//
21+
// AppDelegate.m
22+
// GeeksNearby
23+
//
24+
// Created by Piotr Walczyszyn on 7/16/12.
25+
// Copyright pwalczys@adobe.com 2012. All rights reserved.
26+
//
27+
28+
#import "AppDelegate.h"
29+
#import "MainViewController.h"
30+
31+
#ifdef CORDOVA_FRAMEWORK
32+
#import <Cordova/CDVPlugin.h>
33+
#import <Cordova/CDVURLProtocol.h>
34+
#else
35+
#import "CDVPlugin.h"
36+
#import "CDVURLProtocol.h"
37+
#endif
38+
39+
40+
@implementation AppDelegate
41+
42+
@synthesize window, viewController;
43+
44+
- (id) init
45+
{
46+
/** If you need to do any extra app-specific initialization, you can do it here
47+
* -jm
48+
**/
49+
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
50+
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
51+
52+
[CDVURLProtocol registerURLProtocol];
53+
54+
return [super init];
55+
}
56+
57+
#pragma UIApplicationDelegate implementation
58+
59+
/**
60+
* This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
61+
*/
62+
- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
63+
{
64+
NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
65+
NSString* invokeString = nil;
66+
67+
if (url && [url isKindOfClass:[NSURL class]]) {
68+
invokeString = [url absoluteString];
69+
NSLog(@"GeeksNearby launchOptions = %@", url);
70+
}
71+
72+
CGRect screenBounds = [[UIScreen mainScreen] bounds];
73+
self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
74+
self.window.autoresizesSubviews = YES;
75+
76+
CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
77+
78+
self.viewController = [[[MainViewController alloc] init] autorelease];
79+
self.viewController.useSplashScreen = YES;
80+
self.viewController.wwwFolderName = @"www";
81+
self.viewController.startPage = @"index.html";
82+
self.viewController.invokeString = invokeString;
83+
self.viewController.view.frame = viewBounds;
84+
85+
// check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
86+
BOOL forceStartupRotation = YES;
87+
UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation];
88+
89+
if (UIDeviceOrientationUnknown == curDevOrientation) {
90+
// UIDevice isn't firing orientation notifications yet… go look at the status bar
91+
curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
92+
}
93+
94+
if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
95+
for (NSNumber *orient in self.viewController.supportedOrientations) {
96+
if ([orient intValue] == curDevOrientation) {
97+
forceStartupRotation = NO;
98+
break;
99+
}
100+
}
101+
}
102+
103+
if (forceStartupRotation) {
104+
NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations);
105+
// The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait)
106+
UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue];
107+
NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
108+
[[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
109+
}
110+
111+
[self.window addSubview:self.viewController.view];
112+
[self.window makeKeyAndVisible];
113+
114+
return YES;
115+
}
116+
117+
// this happens while we are running ( in the background, or from within our own app )
118+
// only valid if GeeksNearby-Info.plist specifies a protocol to handle
119+
- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
120+
{
121+
if (!url) {
122+
return NO;
123+
}
124+
125+
// calls into javascript global function 'handleOpenURL'
126+
NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url];
127+
[self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString];
128+
129+
// all plugins will get the notification, and their handlers will be called
130+
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
131+
132+
return YES;
133+
}
134+
135+
- (void) dealloc
136+
{
137+
[super dealloc];
138+
}
139+
140+
@end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
//
21+
// MainViewController.h
22+
// GeeksNearby
23+
//
24+
// Created by Piotr Walczyszyn on 7/16/12.
25+
// Copyright pwalczys@adobe.com 2012. All rights reserved.
26+
//
27+
28+
#ifdef CORDOVA_FRAMEWORK
29+
#import <Cordova/CDVViewController.h>
30+
#else
31+
#import "CDVViewController.h"
32+
#endif
33+
34+
@interface MainViewController : CDVViewController
35+
36+
@end

0 commit comments

Comments
 (0)