Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 35ec6b1

Browse files
authored
Merge pull request #2845 from Microsoft/develop
Merge develop into master. Updates: Adds support for Visual Studio 2017 Update 15.4.5 Update projections to target the 10.0.16299 Windows SDK Address C++ compiler longevity issues
2 parents 04bf9f3 + 49cdea2 commit 35ec6b1

File tree

1,295 files changed

+21685
-6018
lines changed

Some content is hidden

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

1,295 files changed

+21685
-6018
lines changed

Frameworks/UIKit/NSLayoutConstraint.mm

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "NSLayoutConstraint+AutoLayout.h"
2424
#include "AutoLayout.h"
2525

26-
#include <regex>
2726
#include <list>
2827
#include <sstream>
2928
#include <regex>
@@ -56,6 +55,8 @@
5655
typedef vector<Constraint> ConstraintList;
5756

5857
bool parsePredicates(string line, PredicateList& predicates) {
58+
static std::regex s_predicateRex{"^\\s*(==|>=|<=)?([\\w.]+)(@([\\w]+))?\\s*$"};
59+
5960
// Should this be parsed differently between connectors and constraints?
6061
vector<string> predStr;
6162

@@ -77,9 +78,8 @@ bool parsePredicates(string line, PredicateList& predicates) {
7778
}
7879

7980
for (int i = 0; i < predStr.size(); i++) {
80-
regex rex = regex::basic_regex("^\\s*(==|>=|<=)?([\\w.]+)(@([\\w]+))?\\s*$");
8181
smatch m;
82-
if (!regex_search(predStr[i], m, rex)) {
82+
if (!regex_search(predStr[i], m, s_predicateRex)) {
8383
TraceError(TAG, L"Syntax Error! %hs", predStr[i].c_str());
8484
return false;
8585
} else {
@@ -415,6 +415,15 @@ + (NSArray*)constraintsWithVisualFormat:(NSString*)format
415415
options:(NSLayoutFormatOptions)opts
416416
metrics:(NSDictionary*)metrics
417417
views:(NSDictionary*)views {
418+
// ([VH]:)
419+
static std::regex s_vertizontalRex{"^([VH]:).*$"};
420+
// Match all "]-(1,2,3)-["
421+
static std::regex s_connectorRex{"(\\]|\\|)([^\\[]*)?(\\[|\\|)"};
422+
// Match all "[one(>=two,three@4)]" or "|"
423+
static std::regex s_constraintRex{"(\\[([^\\]]*)\\]|\\|)"};
424+
// (sub-unit of a constraint)
425+
static std::regex s_constraintPartRex{"^\\[([\\w]+)(\\(.*\\))?\\]$"};
426+
418427
UIView* superview = nil;
419428
NSArray* items = views.allValues;
420429

@@ -448,19 +457,15 @@ + (NSArray*)constraintsWithVisualFormat:(NSString*)format
448457
ConstraintList constraints;
449458

450459
// Match constraint direction
451-
// ([VH]:)
452-
regex vertizontalRex = regex::basic_regex("^([VH]:).*$");
453460
smatch vertizontalMatch;
454-
if (regex_match(line, vertizontalMatch, vertizontalRex)) {
461+
if (regex_match(line, vertizontalMatch, s_vertizontalRex)) {
455462
if (vertizontalMatch[0].str()[0] == 'V') {
456463
vertical = true;
457464
}
458465
line = line.substr(2);
459466
}
460467

461-
// Match all "]-(1,2,3)-["
462-
regex connectorRex = regex::basic_regex("(\\]|\\|)([^\\[]*)?(\\[|\\|)");
463-
sregex_iterator connectorIt(line.begin(), line.end(), connectorRex);
468+
sregex_iterator connectorIt(line.begin(), line.end(), s_connectorRex);
464469
sregex_iterator end;
465470

466471
while (connectorIt != end) {
@@ -490,9 +495,7 @@ + (NSArray*)constraintsWithVisualFormat:(NSString*)format
490495
connectorIt++;
491496
}
492497

493-
// Match all "[one(>=two,three@4)]" or "|"
494-
regex constraintRex = regex::basic_regex("(\\[([^\\]]*)\\]|\\|)");
495-
sregex_iterator constraintIt(line.begin(), line.end(), constraintRex);
498+
sregex_iterator constraintIt(line.begin(), line.end(), s_constraintRex);
496499
size_t matchEnd = 0;
497500

498501
if (constraintIt->position() != 0) {
@@ -505,9 +508,8 @@ + (NSArray*)constraintsWithVisualFormat:(NSString*)format
505508
#ifdef DEBUG_VISUAL_FORMAT
506509
TraceVerbose(TAG, L"Constraint: %hs", conStr.c_str());
507510
#endif
508-
regex rex = regex::basic_regex("^\\[([\\w]+)(\\(.*\\))?\\]$");
509511
smatch m;
510-
if (!regex_search(conStr, m, rex)) {
512+
if (!regex_search(conStr, m, s_constraintPartRex)) {
511513
if (conStr == "|") {
512514
constraints.push_back(Constraint(PredicateList(), conStr));
513515
} else {

GitVersion.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ branches:
3434
is-release-branch: false
3535
prevent-increment-of-merged-branch-version: true
3636
ignore:
37-
sha: []
37+
sha:
38+
- db05d76b7c9e9371f3edd8bb0085e260d1ad4957

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ When using the bridge, the first thing you'll want to do is generate a Visual St
8888

8989
For more detailed step by step instructions on how to import a project, see the [Quick Start Tutorial](https://github.com/Microsoft/WinObjC/wiki/Quick-Start-Tutorial) page of the wiki. For vsimporter options and known issues, check the [Using vsimporter](https://github.com/Microsoft/WinObjC/wiki/Using-vsimporter) wiki page.
9090

91-
### Analyzing your App
92-
After importing your project, we strongly suggest using the [App Analysis Tool](https://developer.microsoft.com/en-us/windows/bridges/ios/app-analyzer-tool) to have a better understanding of the compatibility of your app with the bridge.
93-
9491
### Building & Running the Samples
9592
A great way to learn more about the bridge and its features is building and running the samples of the SDK, which contain many code examples. We recommend starting with the **WOCCatalog** sample app, which demonstrates an assortment of iOS and XAML UI controls:
9693

@@ -108,11 +105,10 @@ The following resources will help you get started. For more information, check o
108105

109106
1. [Wiki](https://github.com/Microsoft/WinObjC/wiki), for documentation and tutorials
110107
2. [Development Roadmap](https://github.com/Microsoft/WinObjC/wiki/Roadmap), detailing our highest priorities
111-
3. [App Analysis Tool](https://developer.microsoft.com/en-us/windows/bridges/ios/app-analyzer-tool), to evaluate the compatibility of your app with the bridge
112-
4. [Website on Windows Dev Center](https://dev.windows.com/bridges/ios), for evaluation virtual machines
113-
5. [Quick Start Challenge](https://github.com/Microsoft/WinObjC/wiki/Quick-Start-Tutorial), for a quick hands-on introduction to the bridge
114-
7. [FAQ](https://github.com/Microsoft/WinObjC/wiki/FAQ), with common questions and issues
115-
8. [The iOS Bridge Samples Repo](https://github.com/Microsoft/WinObjC-Samples), for sample apps and code using the bridge
108+
3. [Website on Windows Dev Center](https://dev.windows.com/bridges/ios), for evaluation virtual machines
109+
4. [Quick Start Challenge](https://github.com/Microsoft/WinObjC/wiki/Quick-Start-Tutorial), for a quick hands-on introduction to the bridge
110+
5. [FAQ](https://github.com/Microsoft/WinObjC/wiki/FAQ), with common questions and issues
111+
6. [The iOS Bridge Samples Repo](https://github.com/Microsoft/WinObjC-Samples), for sample apps and code using the bridge
116112

117113
## Contributing
118114
There are many ways to contribute to the Windows Bridge for iOS:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dependencies": {
3+
"NuGet.Build.Packaging": "0.1.186"
4+
},
5+
"frameworks": {
6+
".NETFramework,Version=v4.0": {
7+
"imports": [
8+
"dotnet",
9+
"netstandard1.0",
10+
"netstandard1.1",
11+
"netstandard1.2",
12+
"netstandard1.3",
13+
"netstandard1.4",
14+
"netstandard1.5",
15+
"netstandard1.6",
16+
"net20",
17+
"net35",
18+
"net40",
19+
"native",
20+
"monoandroid",
21+
"xamarinios10"
22+
]
23+
}
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dependencies": {
3+
"NuGet.Build.Packaging": "0.1.186"
4+
},
5+
"frameworks": {
6+
".NETFramework,Version=v4.0": {
7+
"imports": [
8+
"dotnet",
9+
"netstandard1.0",
10+
"netstandard1.1",
11+
"netstandard1.2",
12+
"netstandard1.3",
13+
"netstandard1.4",
14+
"netstandard1.5",
15+
"netstandard1.6",
16+
"net20",
17+
"net35",
18+
"net40",
19+
"native",
20+
"monoandroid",
21+
"xamarinios10"
22+
]
23+
}
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dependencies": {
3+
"NuGet.Build.Packaging": "0.1.186"
4+
},
5+
"frameworks": {
6+
".NETFramework,Version=v4.0": {
7+
"imports": [
8+
"dotnet",
9+
"netstandard1.0",
10+
"netstandard1.1",
11+
"netstandard1.2",
12+
"netstandard1.3",
13+
"netstandard1.4",
14+
"netstandard1.5",
15+
"netstandard1.6",
16+
"net20",
17+
"net35",
18+
"net40",
19+
"native",
20+
"monoandroid",
21+
"xamarinios10"
22+
]
23+
}
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dependencies": {
3+
"NuGet.Build.Packaging": "0.1.186"
4+
},
5+
"frameworks": {
6+
".NETFramework,Version=v4.0": {
7+
"imports": [
8+
"dotnet",
9+
"netstandard1.0",
10+
"netstandard1.1",
11+
"netstandard1.2",
12+
"netstandard1.3",
13+
"netstandard1.4",
14+
"netstandard1.5",
15+
"netstandard1.6",
16+
"net20",
17+
"net35",
18+
"net40",
19+
"native",
20+
"monoandroid",
21+
"xamarinios10"
22+
]
23+
}
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dependencies": {
3+
"NuGet.Build.Packaging": "0.1.186"
4+
},
5+
"frameworks": {
6+
".NETFramework,Version=v4.0": {
7+
"imports": [
8+
"dotnet",
9+
"netstandard1.0",
10+
"netstandard1.1",
11+
"netstandard1.2",
12+
"netstandard1.3",
13+
"netstandard1.4",
14+
"netstandard1.5",
15+
"netstandard1.6",
16+
"net20",
17+
"net35",
18+
"net40",
19+
"native",
20+
"monoandroid",
21+
"xamarinios10"
22+
]
23+
}
24+
}
25+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:c8d8621d057a935224f0fa987787a808c3b1019278871cfced19ac77ee45a941
2+
oid sha256:845cf3d870db8f4049818f3a579ad17a4323c9e0659cacca9249dc3ab1924c74
33
size 143872
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:22e2eb4c164ad44631c9db32f2fbee5d1473bb5c98370d0f36d2772e52cfdcc0
2+
oid sha256:2e2bc8298c798e5b6ee9a582340e1449e079dbca7837b536445d23659ee8529a
33
size 7330

0 commit comments

Comments
 (0)